Bug 54481

Summary: Transaction Controller in "Generate Parent Sample" mode : Assertion fails while is should not
Product: JMeter - Now in Github Reporter: shmulikk
Component: MainAssignee: JMeter issues mailing list <issues>
Status: REOPENED ---    
Severity: normal CC: p.mouawad, shmulikk
Priority: P2    
Version: 2.9   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Testplan to reproduce the issue

Description shmulikk 2013-01-24 21:02:52 UTC
I have a response assertion on the root of my test plan.
I have setup a transaction controller and inside it an http sampler.
The assertion works just fine for the http sampler, but it also asserting the transaction controller and failing it with a "Response was null" error.

This now forcing me to duplicate the assertion as a child of each relevant http sampler instead of having just one, at the root of the test plan.

I don't see any reason for assertions to assert logic controller.
Comment 1 shmulikk 2013-01-24 21:06:06 UTC
Created attachment 29893 [details]
Testplan to reproduce the issue
Comment 2 Milamber 2013-01-30 12:24:47 UTC
The transaction controller haven't response data, thus Response Assertion can't check in this data.

In Response Assertion, you can change option "Apply to:" Sub-samples only to work.
Comment 3 shmulikk 2013-01-30 13:58:34 UTC
I am not sure it is invalid.
In more complex cases, I have both Transaction Controllers and (HTTP) Samplers (which are not in Transaction Controllers) in the same level in a thread group.

The solution you suggested will not work in such cases.
Comment 4 Milamber 2013-01-30 16:44:55 UTC
Perhaps we need to disable assertion test on Transaction controller when a Assertion Response passes inside.
Thus, when we have some TC and HTTP Requests at same level than a Assertion Response with Apply to "Main and Subsamplers" there haven't errors (null data on tc)  (and if no errors on req http)
Comment 5 Sebb 2013-01-30 19:25:18 UTC
There is something odd happening here.

If the TC is set to not generate a parent sample, then the RA works.

Adding an Assertion Results Listener shows two entries.

The RA should fail when applied to the TC sample result as that is empty.
Hoewever it does not fail; looks like the RA somehow runs against the wrong data here. Yet the AR Listener shows TC in its list.
Comment 6 The ASF infrastructure team 2022-09-24 20:37:52 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3047