Question regarding Gatling/Maven and global.successfulRequests.percent

I am executing tests with mvn and would like maven to report “build failure” if any request fails.

I’ve noticed that if the number of OK requests is in the 6 figures and a few requests failed (e.g. due to timeout or similar events), Gatling will still report that global.successfulRequests.percent.is(100) = True.

Is this the expected behavior, or might there be some issue with rounding up the percentile?

I guess I could solve it by replacing global.successfulRequests.percent.is(100) with global.failedRequests.count.is(0), but I am just wondering if this is a bug or not?

Yeah, this is a rounding issue, as percent is an Int.
We could try to make it a double, but then you might run into floating point issues (100.0 is not equal to 100.00000000000001)…

Ah, so there is an issue either way. Then it seems that when working with a large amount of requests it is better to go with “global.failedRequests.count.is(0),”.
Thanks for clearing it up for me!

torsdag 10. desember 2015 10.08.14 UTC+1 skrev Stéphane Landelle følgende:

In this case, yes.