How can I see an error in JMeter?
In other words, if a test fails, How is it possible to see the page returned with the error ?
By default, JMeter only flags typical HTTP error response codes, like 4XX and 5XX errors. You should use Response Assertions on your HTTP samplers if you wish to have finer control over what is flagged as an error.
This error tells you either request failed or response failed based on assertion made (text , response code ...)
In our application we have a custom error page displaying a certain message. In JMeter we added a Response Assertion to the TestPlan (Add > Assertions > Response Assertion). We configured this assertion to have a pattern checking for this message (e.g. check for "error occurred" or whatever your error page shows).
Then we added a View Results Tree to the Thread Group (Add > Listener > View Results Tree) and configured it to display the errors only (check Log/Display only Errors). This result tree now captures all error pages along with their requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With