WSO2 ESB is a popular Mediation Bus for middleware messaging in any organization. WSO2 ESB server can expose a plain SOAP service with QOS applied (security, throttling, monitoring etc). Security is one of them which is very important.
Here, the idea is exposing the plain SOAP service as a proxy service and apply security for the proxy service. Following are options WSO2 ESB provides to secure a service.
Let's first create a proxy service in WSO2 ESB. Refer this document for more details. To apply security, in the Management Console, go to Services >> List and click on the proxy service you created. On QOS Configuration, click on security.
Now let us see how to invoke this service using JMeter. You can download Apache JMeter from here. Go to <JMeter_Home>/bin and run
sh jmeter.sh
In the JMeter console choose File >> Templates and choose as below.
Special thing should be noted here. This XML should be formatted very accurately without additional spaces and line breaks, specially on username and password tags. Keep one xml element to a single line.
Now Beanshell script can be written like this. It is like Java.
Note how the parameters are replaced by generated values. Ultimately, JMeter project structure should look like this.
You can also add a constant throughput timer to control the throughput.
Here, the idea is exposing the plain SOAP service as a proxy service and apply security for the proxy service. Following are options WSO2 ESB provides to secure a service.
- UsernameToken
- Non-repudiation
- Integrity
- Confidentiality
In this post I am referring to a proxy service secured by Username Token.
When come to load testing this proxy, you cannot send the same SOAP message again and again to the secured proxy. Apache Rampart which is the underlying security implementation, detect this as a vulnerability if you do so. You need to change these four things per message.
- <wsu:Created>
- <wsu:Expires>
- <wsse:Nonce EncodingType>
- <wsu:Created> (UTC Time)
Creating a proxy service and applying security
Let's first create a proxy service in WSO2 ESB. Refer this document for more details. To apply security, in the Management Console, go to Services >> List and click on the proxy service you created. On QOS Configuration, click on security.
Choose "Enable Security?" as Yes and select Username Token.
Now your proxy service is secured with WS security applied. Easy enough!!.
This is the source code of my proxy.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="securedTestProxy1" transports="https" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <log level="full"/> <respond/> </inSequence> </target> <parameter name="ScenarioID">scenario1</parameter> <enableSec/> <policy key="conf:/repository/axis2/service-groups/securedTestProxy1/services/securedTestProxy1/policies/UTOverTransport"/> <description/> </proxy>
Creating a JMeter SOAP project
Now let us see how to invoke this service using JMeter. You can download Apache JMeter from here. Go to <JMeter_Home>/bin and run
sh jmeter.sh
In the JMeter console choose File >> Templates and choose as below.
Now Build you test, changing SOAP request, invocation path, http headers, assertions etc.
Now to find the correct SOAP request to be sent you can use ESB itself. As soon as message comes into ESB in-sequence, use log mediator to log the message.
Parameterizing SOAP request
Now we want to parameterize the SOAP request. In order to do that, we use BeanShell Preprocessor Script. We need to put what is to be parameterized in the SOAP body as below.
<wsu:Created>${#timeC#}</wsu:Created>
<wsu:Expires>${#timeE#}</wsu:Expires>
Thus, following is my parameterized SOAP message.
<soapenv:Envelope xmlns:ser="http://services.samples" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://services.samples/xsd"> <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Timestamp wsu:Id="TS-05CB7D74E166EF0AB614268666650771109"> <wsu:Created>${#timeC#}</wsu:Created> <wsu:Expires>${#timeE#}</wsu:Expires> </wsu:Timestamp> <wsse:UsernameToken wsu:Id="UsernameToken-05CB7D74E166EF0AB614268666650771108"> <wsse:Username>chanaka</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">chanaka</wsse:Password> <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">${#nonce#}</wsse:Nonce> <wsu:Created>${#UTtimeC#}</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ser:getQuote> <!--Optional:--> <ser:request> <!--Optional:--> <xsd:symbol>IBM</xsd:symbol> </ser:request> </ser:getQuote> </soapenv:Body> </soapenv:Envelope>
Special thing should be noted here. This XML should be formatted very accurately without additional spaces and line breaks, specially on username and password tags. Keep one xml element to a single line.
Now Beanshell script can be written like this. It is like Java.
import org.apache.jmeter.protocol.http.sampler.WebServiceSampler; import org.apache.jmeter.protocol.http.sampler.SoapSampler; import org.jboss.ws.extensions.security.nonce.DefaultNonceGenerator; //(jbosswscore.jar) import org.jboss.util.Base64; //this class is called inside the DefaultNonceGenerator class (jbosscommon.jar) import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; //generating NONCE DefaultNonceGenerator nonce_Gen = new DefaultNonceGenerator(); String nonce = nonce_Gen.generateNonce(); //generating relevant Timestamps long ctmilli = System.currentTimeMillis(); // current time in milliseconds SimpleDateFormat dformat1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // timestamp format with nonce SimpleDateFormat dformat2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); //timestamp format for usernametoken, with miliseconds Date dtime = new Date(); dformat1.setTimeZone(TimeZone.getTimeZone("UTC")); dtime.setTime(ctmilli); // current time String timeCreated = dformat1.format(dtime); // timestamp created in format1 String uttimeCreated = dformat2.format(dtime); // timestamp created in format2 dtime.setTime(ctmilli+2000); // setting the timeout for 2seconds, change the timeout as required String timeExpire = dformat1.format(dtime); // expiration timestamp in format1 vars.put("#timeC#",timeCreated); vars.put("#timeE#",timeExpire); vars.put("#nonce#",nonce); vars.put("#UTtimeC#",uttimeCreated);
Note how the parameters are replaced by generated values. Ultimately, JMeter project structure should look like this.
Generated .jmx file
Following is my .jmx file.
<?xml version="1.0" encoding="UTF-8"?> <jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> <stringProp name="TestPlan.comments"></stringProp> <boolProp name="TestPlan.functional_mode">false</boolProp> <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="TestPlan.user_define_classpath"></stringProp> </TestPlan> <hashTree> <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"> <elementProp name="host" elementType="Argument"> <stringProp name="Argument.name">host</stringProp> <stringProp name="Argument.value">wsf.cdyne.com</stringProp> <stringProp name="Argument.metadata">=</stringProp> <stringProp name="Argument.desc">Host of Webservice</stringProp> </elementProp> </collectionProp> </Arguments> <hashTree/> <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"> <elementProp name="Accept-Encoding" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value">gzip,deflate</stringProp> <stringProp name="Argument.metadata">=</stringProp> <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">Accept-Encoding</stringProp> </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp> <stringProp name="HTTPSampler.port">8243</stringProp> <stringProp name="HTTPSampler.connect_timeout"></stringProp> <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/services/StockQuoteSecure.StockQuoteSecureHttpsSoap11Endpoint</stringProp> <stringProp name="HTTPSampler.concurrentPool">4</stringProp> </ConfigTestElement> <hashTree/> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Number of Users" enabled="true"> <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> <boolProp name="LoopController.continue_forever">false</boolProp> <stringProp name="LoopController.loops">1</stringProp> </elementProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <stringProp name="ThreadGroup.ramp_time">0</stringProp> <longProp name="ThreadGroup.start_time">1375525852000</longProp> <longProp name="ThreadGroup.end_time">1375525852000</longProp> <boolProp name="ThreadGroup.scheduler">false</boolProp> <stringProp name="ThreadGroup.duration"></stringProp> <stringProp name="ThreadGroup.delay"></stringProp> </ThreadGroup> <hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Soap Request" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <collectionProp name="Arguments.arguments"> <elementProp name="" elementType="HTTPArgument"> <boolProp name="HTTPArgument.always_encode">false</boolProp> <stringProp name="Argument.value"><soapenv:Envelope xmlns:ser="http://services.samples" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://services.samples/xsd">
 <soapenv:Header>
 <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
 <wsu:Timestamp wsu:Id="TS-05CB7D74E166EF0AB614268666650771109">
 <wsu:Created>${#timeC#}</wsu:Created>
 <wsu:Expires>${#timeE#}</wsu:Expires>
 </wsu:Timestamp>
 <wsse:UsernameToken wsu:Id="UsernameToken-05CB7D74E166EF0AB614268666650771108">
 <wsse:Username>chanaka</wsse:Username>
 <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">chanaka</wsse:Password>
 <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">${#nonce#}</wsse:Nonce>
 <wsu:Created>${#UTtimeC#}</wsu:Created>
 </wsse:UsernameToken>
 </wsse:Security>
 </soapenv:Header>
 <soapenv:Body>
 <ser:getQuote>
 <!--Optional:-->
 <ser:request>
 <!--Optional:-->
 <xsd:symbol>IBM</xsd:symbol>
 </ser:request>
 </ser:getQuote>
 </soapenv:Body>
 </soapenv:Envelope></stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp> <stringProp name="HTTPSampler.port">8243</stringProp> <stringProp name="HTTPSampler.connect_timeout"></stringProp> <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/services/securedTestProxy1</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> <stringProp name="HTTPSampler.implementation">Java</stringProp> <boolProp name="HTTPSampler.monitor">false</boolProp> <stringProp name="HTTPSampler.embedded_url_re"></stringProp> </HTTPSamplerProxy> <hashTree> <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> <collectionProp name="HeaderManager.headers"> <elementProp name="" elementType="Header"> <stringProp name="Header.name">Content-Type</stringProp> <stringProp name="Header.value">text/xml; charset=utf-8</stringProp> </elementProp> <elementProp name="" elementType="Header"> <stringProp name="Header.name">SOAPAction</stringProp> <stringProp name="Header.value">urn:mediate</stringProp> </elementProp> </collectionProp> </HeaderManager> <hashTree/> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> <collectionProp name="Asserion.test_strings"> <stringProp name="1638474297"><xsd:symbol></stringProp> <stringProp name="0"></stringProp> </collectionProp> <stringProp name="TestPlan.comments">Verify content in response</stringProp> <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> <boolProp name="Assertion.assume_success">false</boolProp> <intProp name="Assertion.test_type">16</intProp> </ResponseAssertion> <hashTree/> </hashTree> <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> <stringProp name="filename"></stringProp> <stringProp name="parameters"></stringProp> <boolProp name="resetInterpreter">false</boolProp> <stringProp name="script">import org.apache.jmeter.protocol.http.sampler.WebServiceSampler; import org.apache.jmeter.protocol.http.sampler.SoapSampler; import org.jboss.ws.extensions.security.nonce.DefaultNonceGenerator; //(jbosswscore.jar) import org.jboss.util.Base64; //this class is called inside the DefaultNonceGenerator class (jbosscommon.jar) import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; //generating NONCE DefaultNonceGenerator nonce_Gen = new DefaultNonceGenerator(); String nonce = nonce_Gen.generateNonce(); //generating relevant Timestamps long ctmilli = System.currentTimeMillis(); // current time in milliseconds SimpleDateFormat dformat1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); // timestamp format with nonce SimpleDateFormat dformat2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); //timestamp format for usernametoken, with miliseconds Date dtime = new Date(); dformat1.setTimeZone(TimeZone.getTimeZone("UTC")); dtime.setTime(ctmilli); // current time String timeCreated = dformat1.format(dtime); // timestamp created in format1 String uttimeCreated = dformat2.format(dtime); // timestamp created in format2 dtime.setTime(ctmilli+2000); // setting the timeout for 2seconds, change the timeout as required String timeExpire = dformat1.format(dtime); // expiration timestamp in format1 vars.put("#timeC#",timeCreated); vars.put("#timeE#",timeExpire); vars.put("#nonce#",nonce); vars.put("#UTtimeC#",uttimeCreated);</stringProp> </BeanShellPreProcessor> <hashTree/> </hashTree> <ResultCollector guiclass="StatGraphVisualizer" testclass="ResultCollector" testname="Aggregate Graph" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>false</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>false</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>true</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>true</responseDataOnError> <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <hostname>true</hostname> <threadCounts>true</threadCounts> <sampleCount>true</sampleCount> </value> </objProp> <stringProp name="filename">/work/jmeter_workplace/secureProxyTestResults</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <threadCounts>true</threadCounts> </value> </objProp> <stringProp name="filename"></stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="kg.apc.jmeter.vizualizers.LatenciesOverTimeGui" testclass="ResultCollector" testname="jp@gc - Response Latencies Over Time" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <threadCounts>true</threadCounts> </value> </objProp> <stringProp name="filename"></stringProp> <longProp name="interval_grouping">500</longProp> <boolProp name="graph_aggregated">false</boolProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="kg.apc.jmeter.vizualizers.TimesVsThreadsGui" testclass="ResultCollector" testname="jp@gc - Response Times vs Threads" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <threadCounts>true</threadCounts> </value> </objProp> <stringProp name="filename"></stringProp> <longProp name="interval_grouping">500</longProp> <boolProp name="graph_aggregated">false</boolProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="kg.apc.jmeter.vizualizers.TransactionsPerSecondGui" testclass="ResultCollector" testname="jp@gc - Transactions per Second" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <threadCounts>true</threadCounts> </value> </objProp> <stringProp name="filename"></stringProp> <longProp name="interval_grouping">1000</longProp> <boolProp name="graph_aggregated">false</boolProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <threadCounts>true</threadCounts> </value> </objProp> <stringProp name="filename"></stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>false</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <threadCounts>true</threadCounts> </value> </objProp> <stringProp name="filename"></stringProp> </ResultCollector> <hashTree/> </hashTree> </hashTree> </jmeterTestPlan>
You can also add a constant throughput timer to control the throughput.
How to test the script
>>Run ESB server by issuing sh wso2server.sh command at <ESB_HOME>/bin
>>Navigate to <ESB_HOME>/samples/axis2Server/src/SimpleStockQuoteService ant issue ant command and build the service. Then go to <ESB_HOME>/samples/axis2Server and run the inbuilt axis2 Server by command sh axis2server.sh. This is used as the Back-end service by proxy service created above.
>>Run the JMeter script
These are some of the results I got. Please note that I have used plugins for JMeter (Standard and Extras).
No comments:
Post a Comment