jmeterjmeter-5.0jmeter-maven-pluginjmeter-logging

JMeter - I want to log/display error responses only in CLI mode


I could see that in GUI mode there is an option to log/Display only errors in View Results tree listener.

Please refer to the image here.

How can i do the same thing on CLI mode, I want lo log/display errors only, please help me!!!


Solution

  • I don't think there is a way to disable logging of failed samplers, the options are in:

    Add JSR223 PostProcessor at global level (the same level as all your Samplers live or higher, see JMeter Scoping Rules for more details) and put the following code into "Script" area:

    if (prev.isSuccessful()) {
        prev.setIgnore()
    }
    

    these lines will prevent successful samplers from being caught by listeners and from being stored in the .jtl results file