Bug 54481 - Transaction Controller in "Generate Parent Sample" mode : Assertion fails while is should not
Summary: Transaction Controller in "Generate Parent Sample" mode : Assertion fails whi...
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.9
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2013-01-24 21:02 UTC by shmulikk
Modified: 2016-02-27 09:13 UTC (History)
2 users (show)

Testplan to reproduce the issue (5.51 KB, application/octet-stream)
2013-01-24 21:06 UTC, shmulikk

Note You need to log in before you can comment on or make changes to this bug.
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.