0

I have a jmx script which saves the results to a CSV file.

I need to see the 'failureMessage' field in the CSV especially when the 'success' column says 'false' as in the below example. But the failureMessage column always appear as blank irrespective in the csv

Example -

timeStamp|time|label|responseCode|threadName|dataType|success|failureMessage

02/06/03 08:21:42|1187|Home|200|Thread Group-1|text|true| 02/06/03 08:21:42|47|Login|200|Thread Group-1|text|false|Test Failed: expected to contain: password etc.

I tried looking up the jmeter.properties file to check the below which is set to true. But it still doesn't save the message to failureMessage in the csv.

assertion_results_failure_message only affects CSV output
jmeter.save.saveservice.assertion_results_failure_message=true
sjkp
  • 35
  • 10

2 Answers2

1

I cannot reproduce your issue using:

  1. Latest JMeter 5.2.1
  2. With the default Results File Configuration
  3. Running JMeter in command-line non-GUI mode

Demo:

enter image description here

If you cannot see custom assertion failure messages your setup violates at least one of the above 3 points.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks for your reply! But I am using 'JSON Assertion' to assert the response fields and values and not Response Assertion. I am not able to see the failureMessage populated by following your steps. – sjkp Apr 27 '20 at 13:31
  • Once I run the script in Jmeter and navigate to View Results Tree -> Assertion result tab, I am able to see the 'Assertion failure message'. I need this message to be displayed in the csv. It would be great if you could find a solution. – sjkp Apr 27 '20 at 13:55
0

Try adding assertions with your requests and you will find it in your results in case of assertions getting failed.

Raj
  • 187
  • 1
  • 7