You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/06/19 12:19:48 UTC

[Bug 64539] New: View Result Tree: incorrect display of Assertion Result when defined globally

https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

            Bug ID: 64539
           Summary: View Result Tree: incorrect display of Assertion
                    Result when defined globally
           Product: JMeter
           Version: 5.3
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: marc.stern@approach.be
  Target Milestone: JMETER_5.3.1

Created attachment 37317
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37317&action=edit
screenshot

I have a JSR223 Assertion defined at the Thread group level.
It is correctly executed for each HTTP Request sampler.
When the assertion fails via AssertionResult.setFailure(true), it correctly add
a red Assertion Result in the View Result Tree.
Problem: the HTTP Request in the View Result Tree stays green. When looking at
the View Result Tree, all tests seem OK (see screenshot).

If the same assertion is added inside each HTTP Request, the View Result Tree
correctly displays the HTTP Request in red (but it would require to duplicate
the assertion to thousands of requests which is not manageable).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
   Target Milestone|JMETER_5.3.1                |---

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Marc Stern <ma...@approach.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #37320|0                           |1
        is obsolete|                            |

--- Comment #3 from Marc Stern <ma...@approach.be> ---
Created attachment 37321
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37321&action=edit
Test with one assertion outside of a sampler + another one outside the Thread
Group

I found the exact: it's an interaction with another assertion.
I attached your test modified: I added a Response Assertion at the global
level.
It seems the Response Assertion - that's executed after the Groovy one -
ovewrites the Sampler result.
Same result if I put both assertions inside the sampler: the sampler only
"remembers" the last one.

To recap:
 - assertion 1: fail
 - assertion 2: ok
 result: ok

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
Can you give a simple test plan, that exhibits the failure? My test plan works
as intended and the sampler gets marked as failed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

--- Comment #4 from Marc Stern <ma...@approach.be> ---
I never had that problem in JMeter 4

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #7 from Felix Schumacher <fe...@internetallee.de> ---
Can you give a test plan for your setup to show exactly what kind of global
assertions you want to have? I am not sure, that I get your expectations on
this correctly.

You should be able to simulate the responses (with status and headers) using a
JSR223 Sampler or an Java Request Sampler.

While this might not be a "bug", it could be an enhancement :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37320
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37320&action=edit
Test with one assertion outside of a sampler

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Marc Stern <ma...@approach.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Marc Stern <ma...@approach.be> ---
I didn't make the link with the "ignore status".
I'm pretty sure I had the same test in JMeter 4 but I'm not 100% sure.

You're right, it's documented, so it's a feature :-(
I don't understand why the Response status is forced to successful instead of
not changing the status in case we have an error code, but I imagine it's a
technical limitation. Too bad!

There's actually no way to add a global assertion checking, for instance, for
invalid headers without having a huge side-effect on the results (either
flagging requests correctly returning a non-200, or not flagging eral errors).
I don't expect you to fix this or to continue the discussion, but I let you
close the ticket.

Thanks for your answer.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Marc Stern <ma...@approach.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64539] View Result Tree: incorrect display of Assertion Result when defined globally

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64539

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #5 from Felix Schumacher <fe...@internetallee.de> ---
I checked your modified test plan with JMeter 4.0 and it showed the same
behaviour. Are you sure, that you tried exactly the same things with JMeter
4.0?

The documentation for
https://jmeter.apache.org/usermanual/component_reference.html#Response_Assertion
and especially "ignore status" means to me, that this is not a bug.

The documentation states, that the response assertion has to be the first
assertion to work properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.