Bug 54156 - DurationAssertion does not seem to make difference between Main sample only and Main sample and sub-samples for time
Summary: DurationAssertion does not seem to make difference between Main sample only a...
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.8
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on: 51939
Blocks:
  Show dependency tree
 
Reported: 2012-11-15 23:06 UTC by Philippe Mouawad
Modified: 2017-01-27 17:12 UTC (History)
2 users (show)



Attachments
Test Plan showing issue (6.75 KB, application/xml)
2013-01-05 21:58 UTC, Philippe Mouawad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2012-11-15 23:06:47 UTC
I may be wrong but I don't see in JMeterThread#checkAssertions code:
if (scopedAssertion.isScopeParent(scope) || scopedAssertion.isScopeAll(scope) || scopedAssertion.isScopeVariable(scope)){
                    processAssertion(parent, assertion);
                }

Code passes parent whether parent or Parent+Subsamples  are selected and DurationAssertion uses response.getTime() which does not make the difference between parent and parent+sub samples.

Related to 51939



See:
http://mail-archives.apache.org/mod_mbox/jmeter-user/201211.mbox/%3CDF8EC4058D0FD04583D2DFDBD3934C210FD75512%40SIXPRD0410MB395.apcprd04.prod.outlook.com%3E
Comment 1 Philippe Mouawad 2013-01-05 21:58:05 UTC
Created attachment 29819 [details]
Test Plan showing issue
Comment 2 Dzmitry Kashlach 2014-11-04 12:21:15 UTC
(In reply to Philippe Mouawad from comment #0)
> I may be wrong but I don't see in JMeterThread#checkAssertions code:
> if (scopedAssertion.isScopeParent(scope) ||
> scopedAssertion.isScopeAll(scope) || scopedAssertion.isScopeVariable(scope)){
>                     processAssertion(parent, assertion);
>                 }
> 

 Actually, this code is present in JMeterThread(lines 677-679).
But as far as I understand from code, Duration Assertion is processed against parent+subsamples time anyway(if subsamples are present).
 This happens because SampleResult contains time not only for parent request, but for parent+subrequests. To my mind, changes in SampleResult are required.
Comment 3 Dzmitry Kashlach 2014-11-05 14:16:33 UTC
> To my mind, changes in SampleResult are required.
May be, splitting field SampleResult.elapsedTime into two ones(mainElapsedTime&childElapsedTime) will be good solution?
Comment 4 Brian Tully 2017-01-27 17:12:30 UTC
+1

Still seeing this issue in JMeter 3.x.

Perhaps the UI element (radiobutton) for "Main sample only" can be removed/hidden from the Duration Assertion GUI until this can be resolved?