How to count failed requests with jmeter

2019-04-28 16:25发布

问题:

I am running JMeter and I want a count of all the failed requests that either timed out, or, just plain failed. I see that some of the listeners show that there have been failures, but none see to have a field that displays the total number of failed requests versus successful requests. Does anyone know how I can easily get this data without having to count each failure by hand?

回答1:

  • Add timeout to your sampler

  • Add assertions on code and response content

  • Use aggregate report

You should have these figures



回答2:

Add the Aggregate report to the thread group.Which gives you total transaction count and the " Error % ". So that you can know about the number of failed transactions

If you want to know particular failure scenario then add the Assertion with the request. In the assertion just mention the scenario you want to check.

    • Aggregate report
    • Assertion**


回答3:

To check the number of failed responses go through following steps:

1) Add >> Listener >> View result tree >> select the check box of 'Errors' It will only capture responses with failed messages not of success With this you can check response message, sent request in detail![enter image description here][1]

And if you want to know about total count of failed requests and average time,max time then go through following steps:

2) Add >> Listener >> Summary Report >> select the check box of 'Errors' It will only capture summary report of requests with failed responses not of success