Headless JMeter -How to get printed the response data in the output file

后端 未结 2 418
挽巷
挽巷 2021-02-10 14:55

I am running a load test by using a jmeter script in non gui mode.

I use the following command to run the JMeter in non gui mode and result is stored in a file Test.jtl<

相关标签:
2条回答
  • 2021-02-10 15:50

    The response data will be recorded in your JTL, if you check "Save as XML" and "Save Response Data XML" instead of CSV file in your Sample Result Save Configuration.

    0 讨论(0)
  • 2021-02-10 15:54

    By default JMeter does not store response data as:

    1. It increases execution overhead due to high disk IO
    2. The size of .jtl file is greatly increased
    3. Storing response data in default format (which is CSV) is not possible as response data will definitely have at least one delimiter character

    You can still configure JMeter to store response data, but keep in mind above constraints. In order to do so pass the following extra command line arguments:

    sh jmeter.sh -Jjmeter.save.saveservice.output_format=xml -Jjmeter.save.saveservice.response_data=true -n -t ThreadGroup.jmx -l Test.jtl
    

    another option is adding next 2 lines to user.properties file (located in /bin folder of your JMeter installation)

    jmeter.save.saveservice.output_format=xml
    jmeter.save.saveservice.response_data=true
    

    See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of working with them

    0 讨论(0)
提交回复
热议问题