I tried the multiple API hits on the server through Jmeter and save the result data in the file but some how I cant print the failure Message in the file, any body helps me how to print the failure message.?enter image description hereenter image description here

2 Answers 2


I would suggest using a JSR223 post processor, where you will need to do a little scripting to get what you need to save as a CSV file. Here is basic pseudo-code to help with this.

//use PREV to get response data from previous sampler
//format this data (remove commas) and output to CSV file
outLog.write(csvResponse + "\n")

for an example in java, please see:



failureMessage in the .jtl results file is applicable only for Assertions, if you're looking for a way to create a custom file having only response message and response data the easiest way is going for Flexible File Writer, the basic configuration would look like:

enter image description here

You can install Flexible File Writer using JMeter Plugins Manager:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.