views:

198

answers:

3

How can I see a Error in jMeter? In other words if a test fail how is possible to see the page returned with error ?

Regards

A: 

Depending on how you set up your test, you will most likely get a 404, 401 or 500 error code from your server.

You can then use the access logs of the server (not jMeter) to see which page it was that returned the error.

Benedikt Eger
+3  A: 

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.

rudolfson
A: 

Hello,

I would like to run a test till 10 errors are obtained. hence I would have a counter which will be incremented each time there is an error, and finish the test when the counter will be at 10.

So I will have to increment the counter if an assertion is failed for example. how can I do this ?

I would like to see a variable that I could test with a if statement, which variable has been updated by the assert block, but it seems not possible. I would like to be wrong.