How to ignore login and logout requests in JMeter?
Since JMeter 4.0 it is possible to add SampleResult.setIgnore() to tell JMeter to ignore SampleResult by Listeners.
Reference: https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html#setIgnore--
P.S. SampleResult
variable in case of Beanshell, sampleResult
for JS and prev
for Groovy, see jmeter.apache.org/usermanual/functions.html.
TO my knowledge, there is not an easy way to exclude. However, by changing your structure, you can get what you want.
The Listeners tune into all children levels. Thus, if you have the listener as a direct child to the "test plan", all thread groups will be grabbed by the listener. If you have multiple threadgroups, and place the listener in Threadgroup A, it will not capture results from Threadgroup B. The same applies for Simple Controllers also.
I would suggest the following structure:
Test Plan
- Thread Group
---- Simple Controller - Login ONLY
---- Simple Controller - Rest of Script
--------- Listener