When I'am running jmeter script in NON-GUI mode using the below command
jmeter -n -t test_plan.jmx -l logs.jtl
The jtl file generated does not contain any info like sampler request,response,headers etc. when viewed in view result tree. I want to record the request,response,headers,url etc. info in jtl file only for the failed samplers and not for the all samplers as recording for all samplers irrespective of fail or pass will make jtl file heavy. How can I record request,response,headers,url etc. info for only the failed samplers in the jtl file and view it in view result tree later using GUI mode? Thanks!!!
So the options are in:
Either amend JMeter's Results File Configuration and choose what do you want to store in XML format
Or add a Listener like Simple Data Writer and configure it to save request and response data only for failed samplers like:
This way you will get
logs.jtl
file in CSV format with all the metricserrros.xml
file containing request and response details for failed samplers onlyMore information: How to Save Response Data in JMeter