You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Tong Sun <su...@gmail.com> on 2022/06/07 14:18:12 UTC

Easy way to save the req/resp session

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?

Re: Easy way to save the req/resp session

Posted by Dmitri T <gl...@live.com>.
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?
>

Re: Easy way to save the req/resp session

Posted by OUFDOU Anas <ou...@gmail.com>.
Hello ,

You can see available config properties to save data to file (Xml) :

https://jmeter.apache.org/usermanual/properties_reference.html#results_file_config

Best Regards

On Tue, Jun 7, 2022 at 3:18 PM Tong Sun <su...@gmail.com> 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?
>


-- 
Cordialement,
-------------
Anas OUFDOU