0

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

1

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
prev.getResponseDataAsString()
//format this data (remove commas) and output to CSV file
outLog.write(csvResponse + "\n")

for an example in java, please see:

https://lobsterautomation.wordpress.com/2018/01/14/jsr223-tips-and-tricks-part-5/

| improve this answer | |
0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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