warg
warg

Reputation: 13

How to to get multiple output files with non-gui JMeter?

I need to have 2 output files, one with successes only and another one with failed status. First file must be in CSV format and another in XML (it must contain response data with response body). The solution must be in the non gui mode.

My current solution with one file:

jmeter.bat -Jjmeter.save.saveservice.output_format=xml -Jjmeter.save.saveservice.response_data=true -n -t JMeterFile.jmx -l OutputFile.jtl

I don't know how to make two output files with different content.

Upvotes: 1

Views: 450

Answers (1)

Dmitri T
Dmitri T

Reputation: 168157

  1. For the default .jtl file in CSV (for example suitable for generating HTML Reporting Dashboard) format run JMeter in command-line non-GUI mode like:

    jmeter.bat -n -t JMeterFile.jmx -l OutputFile.jtl
    
  2. For getting another file with detailed information on errors add a Listener, i.e. Simple Data Writer would be a good choice and configure it like:

    enter image description here

This way you will get 2 files:

  • OutputFile.jtl - in CSV format with all metrics for all Samplers
  • Errors.xml - in XML format for failed samplers only having response data (you can tick other boxes as well if you want more details)

More information: How to Save Response Data in JMeter

Upvotes: 1

Related Questions