Search code examples
jmeterbeanshell

Write request and response data to file in jmeter


I have one testcase which contains 7 requests. I need to write both request (whole request which is passing along with dynamic values) and response data (whole response) to a file for all of them during run time. Please help me how can I do this in JMeter?


Solution

  • Use flexible file writer in the request. Give |requestData| and |responseData| in "Record each sample as" field. Give the path where you want to save your data in Filename field. That's it.You will be able to see a file which contains the request and response data for the sampler request.Hope this helps!