[ACCEPTED]-How to ignore login and logout requests in JMeter?-jmeter

Accepted answer
Score: 17

TO my knowledge, there is not an easy way 10 to exclude. However, by changing your structure, you 9 can get what you want.

The Listeners tune 8 into all children levels. Thus, if you have 7 the listener as a direct child to the "test 6 plan", all thread groups will be grabbed 5 by the listener. If you have multiple threadgroups, and 4 place the listener in Threadgroup A, it 3 will not capture results from Threadgroup 2 B. The same applies for Simple Controllers 1 also.

I would suggest the following structure:

Test Plan
- Thread Group
---- Simple Controller - Login ONLY
---- Simple Controller - Rest of Script
--------- Listener
Score: 12

Since JMeter 4.0 it is possible to add SampleResult.setIgnore() to 3 tell JMeter to ignore SampleResult by Listeners.

Reference: https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html#setIgnore--

P.S. SampleResult variable 2 in case of Beanshell, sampleResult for JS and prev for Groovy, see 1 jmeter.apache.org/usermanual/functions.html.

More Related questions