Bug 45831

Summary: WS Sampler reports incorrect throughput if SOAP packet creation fails
Product: JMeter - Now in Github Reporter: Radek Mista <rmista>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.3.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: WebServiceSampler Patch

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
Comment 2 The ASF infrastructure team 2022-09-24 20:37:42 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2153