Search code examples
jmeterjmeter-plugins

how to save whole response message in jmeter


I am receiving below response in jmeter-

[{"Status":"Failed","ErrorDesc":"Duplicate Transaction Id","Amount":"23","CorporateID":"aaa","StatusCode":"ERR0DUP","TransactionReferenceNumber":"1111"}]

I need to save this whole response message. I tried by using listner,and using csv file as well but only b able to save response like - OK,true

Please help me to save whole response as it is.


Solution

  • You could use the Save the Response to a File Sampler with following configuration enter image description here

    1. Ensure "Don't add number to prefix" check box is not checked
    2. Set the Minimum Length of sequence number (e.g 6)

    You can try with following options for unique file names

    1. Check the Add timestamp

    2. Use ${__threadNum} and/or ${__threadGroupName} fields with file name

      response-${__threadGroupName}-{__threadNum}.json