<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Groovy &#8211; Jitendra Zaa</title>
	<atom:link href="https://www.jitendrazaa.com/blog/tag/groovy/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jitendrazaa.com/blog</link>
	<description>AI, Salesforce, ServiceNow &#38; Enterprise Tech Guides</description>
	<lastBuildDate>Thu, 23 Apr 2020 14:47:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">87744916</site><atom:link rel="search" type="application/opensearchdescription+xml" title="Search Jitendra Zaa" href="https://www.jitendrazaa.com/blog/wp-json/opensearch/1.1/document" />	<item>
		<title>Salesforce Load Testing using SOAPUI</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/salesforce-load-testing-using-soapui/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/salesforce-load-testing-using-soapui/#respond</comments>
		
		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Thu, 23 Apr 2020 14:41:04 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SoapUI]]></category>
		<category><![CDATA[Testing]]></category>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=7041</guid>

					<description><![CDATA[Previously, I have added multiple posts in this blog on how you would face governor limit errors on each step of Salesforce implementation and how we can leverage selenium to perform load testing of Salesforce to some extent. SOAP UI is powerful tool and in this post we will see how it can be used [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="justify">Previously, I have <a href="https://www.jitendrazaa.com/blog/tag/automated-testing/">added multiple posts</a> in this blog on how you would face <a href="https://www.jitendrazaa.com/blog/salesforce/a-tale-of-governor-limits-and-solutions-in-salesforce/">governor limit errors</a> on each step of Salesforce implementation and how we can leverage <a href="https://www.jitendrazaa.com/blog/java/performing-load-testing-in-salesforce-using-selenium-and-testng/">selenium</a> to perform load testing of Salesforce to some extent.</p>



<p class="justify"><a href="https://www.jitendrazaa.com/blog/tag/soap/">SOAP UI </a>is powerful tool and in this post we will see how it can be used to perform load testing of Salesforce API.</p>



<p class="justify"><strong>Step 1 </strong>: Download PartnerWSDL from your Salesforce instance and <a href="https://www.jitendrazaa.com/blog/salesforce/using-soapui-with-salesforce-to-test-standard-and-custom-web-services-response/">create SOAP UI Project</a>.</p>



<p><strong>Step 2</strong> : Create a Test Suite in SOAP UI</p>



<span id="more-7041"></span>



<p><strong>Step 3 </strong>: Create a Groovy script to generate random Account Name</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: vb; title: ; notranslate">
def generator = { String alphabet, int n -&gt;
  new Random().with {
    (1..n).collect { alphabet&#x5B; nextInt( alphabet.length() ) ] }.join()
  }
}

def accName = generator( ((&#039;A&#039;..&#039;Z&#039;)+(&#039;0&#039;..&#039;9&#039;)).join(), 9 )
testRunner.testCase.getTestStepByName(&quot;AccParameter&quot;). setPropertyValue(&quot;AccountName&quot;,accName)

def accNumber = testRunner.testCase. getPropertyValue(&quot;AccountNumber&quot;)

</pre></div>


<p><strong>Step 4</strong> : Create a Login request in SOAP UI using Partner WSDL, sample request looks like</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; title: ; notranslate">
&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:urn=&quot;urn:partner.soap.sforce.com&quot;&gt;
   &lt;soapenv:Header&gt;
      &lt;urn:CallOptions&gt;
         &lt;urn:client&gt;?&lt;/urn:client&gt; 
      &lt;/urn:CallOptions&gt;
      &lt;urn:LoginScopeHeader&gt; 
         &lt;!--Optional:--&gt; 
      &lt;/urn:LoginScopeHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:login&gt;
         &lt;urn:username&gt;SFUsername&lt;/urn:username&gt;
         &lt;urn:password&gt;SFPassword&lt;/urn:password&gt;
      &lt;/urn:login&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;

</pre></div>


<p><strong>Step 5 </strong>: Create property step to create two parameter as shown in below</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="821" height="148" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Create-Propert-Step.png?resize=821%2C148&#038;ssl=1" alt="" class="wp-image-7048" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Create-Propert-Step.png?w=821&amp;ssl=1 821w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Create-Propert-Step.png?resize=300%2C54&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Create-Propert-Step.png?resize=768%2C138&amp;ssl=1 768w" sizes="(max-width: 821px) 100vw, 821px" /></figure>



<p class="justify"><strong>Step 6</strong> : Create Step with property transfer. In this step, we would read Salesforce session Id returned by Login API and pass it to create Account API. To compute X-Path, we can use <a href="https://xmlgrid.net/xpath.html">xmlGrid website</a>.</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" width="833" height="294" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Read-parameter-from-Response-and-pass-to-next-Request.png?resize=833%2C294&#038;ssl=1" alt="" class="wp-image-7049" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Read-parameter-from-Response-and-pass-to-next-Request.png?w=833&amp;ssl=1 833w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Read-parameter-from-Response-and-pass-to-next-Request.png?resize=300%2C106&amp;ssl=1 300w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2020/04/SOAP-UI-Read-parameter-from-Response-and-pass-to-next-Request.png?resize=768%2C271&amp;ssl=1 768w" sizes="(max-width: 833px) 100vw, 833px" /></figure>



<p>XPath to read Session of Salesforce</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
/*:Envelope/*:Body/*:loginResponse/*:result/*:sessionId
</pre></div>


<p>X-Path to pass Session Id in Create request</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
/*:Envelope/*:Header/*:SessionHeader/*:sessionId
</pre></div>


<p><strong>Step 7</strong> : In this step we would insert Account using SessionId transferred from previous parameter transfer step </p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: xml; title: ; notranslate">
&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:urn=&quot;urn:partner.soap.sforce.com&quot; xmlns:xsi=&quot;xsi&quot;&gt;
   &lt;soapenv:Header&gt;
      &lt;urn:PackageVersionHeader/&gt;
      &lt;urn:LocaleOptions/&gt;
     &lt;urn:MruHeader&gt;
      &lt;/urn:MruHeader&gt;
      &lt;urn:SessionHeader&gt;
         &lt;urn:sessionId&gt;Salesforce Session Id&lt;/urn:sessionId&gt;
      &lt;/urn:SessionHeader&gt;
   &lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;urn:create&gt;
      	&lt;urn:sObjects xsi:type=&quot;urn1:Account&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
      		&lt;Name&gt;${AccParameter#AccountName}&lt;/Name&gt;
      		&lt;AccountNumber&gt;${AccParameter#AccountNumber}&lt;/AccountNumber&gt;
      		&lt;TextField__c&gt;InsertedViaSoapUI&lt;/TextField__c&gt;
      	&lt;/urn:sObjects&gt;
      &lt;/urn:create&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;
</pre></div>


<p class="justify">In this step, you might get this error &#8220;<strong>Destination URL not reset. The URL returned from login must be set in the SforceService</strong>&#8220;. To resolve this, change URL of request in SOAP UI address bar. Shown in 30 Min Video below</p>



<p><strong>Step 8</strong> : Final step is to create a Groovy script to auto increment Account Number</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: vb; title: ; notranslate">
def accNumber = testRunner.testCase.getTestStepByName(&quot;AccParameter&quot;). getPropertyValue(&quot;AccountNumber&quot;).toInteger() 
accNumber = accNumber + 1 

testRunner.testCase.getTestStepByName(&quot;AccParameter&quot;). setPropertyValue(&quot;AccountNumber&quot;, accNumber.toString()) 
log.info(accNumber)

</pre></div>


<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Learn SOAP UI to perform Salesforce Load Testing in 5 Minutes" width="500" height="281" src="https://www.youtube.com/embed/1LSmv2pc-YI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/salesforce-load-testing-using-soapui/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7041</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.jitendrazaa.com @ 2026-06-09 22:23:29 by W3 Total Cache
-->