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

后端 未结 2 420
挽巷
挽巷 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: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

提交回复
热议问题