Bug 45831 - WS Sampler reports incorrect throughput if SOAP packet creation fails
WS Sampler reports incorrect throughput if SOAP packet creation fails
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.3.2
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-09-18 02:52 UTC by Radek Mista
Modified: 2008-09-22 12:46 UTC (History)
0 users



Attachments
WebServiceSampler Patch (497 bytes, patch)
2008-09-18 02:52 UTC, Radek Mista
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Mista 2008-09-18 02:52:27 UTC
Created attachment 22600 [details]
WebServiceSampler Patch

WebService sampler reports incorrect throughput in Aggregate Report if a creation of any SOAP packets fails (i.e. if the SOAP data contains unencoded invalid characters such as &, <, >). This issue might be related to bug #33940.

This issue is caused due to the fact that the SampleResult startTime and endTime are not getting set if an error occurs and exception is thrown in WebServiceSampler::sample() method. Leaving the SampleResult's startTime equal to 0 causes the SamplingStatCalculator to set the test start time to 0 which causes incorrect overall throughput calculation.

Steps to recreate:
1) Set up a Test Plan with a WS Request Sampler (preferably reading the SOAP XML data from a file) and Aggregate Report
2) Set up the SOAP data so that one packet would include unencoded invalid XML character 
3) Run the test and notice that the throughput in the Aggregate Report is reported as 0.0/hr for the entire the test after incorrect SOAP packet has been processed.

Attached patch adds code to WebServiceSampler::sample() which ensures that result startTime and endTime are always set.
Comment 1 Sebb 2008-09-22 12:46:08 UTC
Thanks for the report and patch; it has been applied to SVN:

URL: http://svn.apache.org/viewvc?rev=697963&view=rev
Log:
Bug 45831 - WS Sampler reports incorrect throughput if SOAP packet creation fails