Bug 54985 - Make Transaction Controller set Response Code of Generated Parent Sampler to response code of first failing child in case of failure of one of its children
Make Transaction Controller set Response Code of Generated Parent Sampler to ...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
unspecified
All All
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-05-16 14:23 UTC by Mikhail Epikhin
Modified: 2013-06-05 22:51 UTC (History)
1 user (show)



Attachments
ResponseCode of TransactionSampler (1005 bytes, patch)
2013-05-16 14:23 UTC, Mikhail Epikhin
Details | Diff
simple testplan (17.74 KB, application/xml)
2013-05-28 09:18 UTC, Mikhail Epikhin
Details
Set responseCode if transaction is successful (30.95 KB, image/png)
2013-05-28 09:19 UTC, Mikhail Epikhin
Details
Set responseCode if transaction is failure and child sampler have bad responseCode (34.74 KB, image/png)
2013-05-28 09:20 UTC, Mikhail Epikhin
Details
Set responseCode if transaction is failure and child sampler have exception (34.83 KB, image/png)
2013-05-28 09:20 UTC, Mikhail Epikhin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Epikhin 2013-05-16 14:23:16 UTC
Created attachment 30288 [details]
ResponseCode of TransactionSampler

Default TransactionSampler don't have response code. This patch added this. Sets last succesful or first fault response code of child sampler.
Comment 1 Philippe Mouawad 2013-05-27 20:02:39 UTC
Hello,
Thanks for patch.

Can you tell what is the impact of the issue that is fixed as my tests show that response code is set in TransactionController#setTransactionDone

Did you notice a Case where Code is not set ? If yes could you provide a simple test plan showing issue ?

Thanks
Comment 2 Mikhail Epikhin 2013-05-28 09:18:42 UTC
Created attachment 30332 [details]
simple testplan
Comment 3 Mikhail Epikhin 2013-05-28 09:19:27 UTC
Created attachment 30333 [details]
Set responseCode if transaction is successful
Comment 4 Mikhail Epikhin 2013-05-28 09:20:06 UTC
Created attachment 30334 [details]
Set responseCode if transaction is failure and child sampler have bad responseCode
Comment 5 Mikhail Epikhin 2013-05-28 09:20:32 UTC
Created attachment 30335 [details]
Set responseCode if transaction is failure and child sampler have exception
Comment 6 Mikhail Epikhin 2013-05-28 09:21:20 UTC
Every SampleResult have 2 field : successful and responseCode. TransactionController#setTransactionDone sets repsonceCode (200) only if transaction is successful. If transaction is failure, responseCode empty. This patch sets responseCode always. It's good way to determine real problem if you using transactions.
Comment 7 Philippe Mouawad 2013-06-03 21:20:48 UTC
Date: Mon Jun  3 21:19:07 2013
New Revision: 1489182

URL: http://svn.apache.org/r1489182
Log:
Bug 54985 - Make Transaction Controller set Response Code of Generated Parent Sampler to response code of first failing child in case of failure of one of its children
Bugzilla Id: 54985

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/control/TransactionSampler.java
    jmeter/trunk/xdocs/changes.xml
Comment 8 Philippe Mouawad 2013-06-03 21:21:21 UTC
Thanks for patch, useful as we have now have root cause of failure in parent sampler.
Comment 9 Mikhail Epikhin 2013-06-04 05:06:32 UTC
Thank you!:)
Comment 10 Sebb 2013-06-05 22:51:40 UTC
URL: http://svn.apache.org/r1490054
Log:
Make Transaction Controller set Response Code of Generated Parent Sampler to response code of first failing child in case of failure of one of its children
Bugzilla Id: 54985