Gatling - show failed requests only after max retry

2.7k Views Asked by At

In my test scenario I'm polling user session for possible responses. due to the product behavior' this is normal to receive 503 several times before receiving response and this is the reason why I'm retrying up to 5 times.

tryMax(5){
      exec(http("Poll user")
        .get("/something.html")
        .queryParamMap(Map("NC" -> "true", "data" -> "true", "v" -> "1"))
        .check(
          status.is(200))
      )}

Now' when I look at statistics I see 4 failed requests:

[--------------------------------------------------------------------------]  0%
          waiting: 0      / active: 80     / done:0
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=1771   KO=4     )
> Form Login                                               (OK=80     KO=0     )
> **********************                                   (OK=80     KO=0     )
> Agent Base                                               (OK=80     KO=0     )
> Login                                                    (OK=80     KO=0     )
> Set availability to Online                               (OK=80     KO=0     )
> Poll session                                             (OK=1291   KO=4     )
---- Errors --------------------------------------------------------------------
> status.find.is(200), but actually found 503                         4 (100.0%)
================================================================================

I would like to see a KO statistics only for requests that failed after 5 reties, because from my point of view, if it succeeded with less then 5 retries it wouldn't mean that the request failed.

Can I do so?

0

There are 0 best solutions below