Bug 54156

Summary: DurationAssertion does not seem to make difference between Main sample only and Main sample and sub-samples for time
Product: JMeter - Now in Github Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: normal CC: dzmitry.kashlach, p.mouawad
Priority: P2    
Version: 2.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on: 51939    
Bug Blocks:    
Attachments: Test Plan showing issue

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