Add a Listener, for example Simple Data Writer
<https://jmeter.apache.org/usermanual/component_reference.html#Simple_Data_Writer>
and provide the desired file path. Then click "Configure" button and
choose what do you want to store. To save requests and responses you
will mostly need those parameters which contain *XML*
Another way is adding the next lines to /user.properties/ file (lives in
"bin" folder of your JMeter installation)
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.responseHeaders=true
jmeter.save.saveservice.url=true
once done when you will run your JMeter test in command-line non-GUI
mode <https://jmeter.apache.org/usermanual/get-started.html#non_gui> the
resulting.jtl file
<https://cwiki.apache.org/confluence/display/jmeter/JtlFiles> will
contain all request and response details.
The recorded sessions can be inspected usingView Results Tree listener
<https://jmeter.apache.org/usermanual/component_reference.html#View_Results_Tree>
More information: How to Save Response Data in JMeter
<https://www.blazemeter.com/blog/how-to-save-response-data-in-jmeter>
On 6/7/2022 4:18 PM, Tong Sun wrote:
Hi,
Say I run my JMeter script using a single user for a single time, is there
any easy way to save the whole session, both the requests and responses,
including the headers, to some file for later inspection?