Selectively ignore failures?

I’m writing a Gatling scenario which include loading of static assets (css, images etc.).

The whole scenario is wrapped in exitBlockOnFail, as it is a stateful service, and a failure early in the chain will cause multiple unimportant failures later which creates noise in the final report.

However, occasionally failures are caused by timeouts when trying to fetch static assets. Is there a way to mark these requests as ‘unimportant’, so they don’t trigger the exitBlockOnFail functionality?

We have a silent request option that makes it not logged. Maybe we could also make it not trigger the status too.

Thoughts?

Hi Tom,

Now, silent requests no longer trigger status to be set to KO, see https://github.com/gatling/gatling/issues/2148

You can either make a request silent directly on it, or define a pattern on the HTTP protocol with silentURI.

I’ll also implement https://github.com/gatling/gatling/issues/2146.

Regards,

Stéphane

Hi Stehane,

How can I add multiple silentUri parameters to the HTTP protocol?
When I am adding multiple.silentURI only one of the url are getting silent and not the other one.

.baseUrl(“baseurl”)

.acceptHeader("/")

.inferHtmlResources()

.userAgentHeader(“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36”)

.silentUri(“https://xxx.com/xxx.js”)

.silentUri(“https://yyy.com/yyy.js”)

By adding above parameters only “https://yyy.com/yyy.js” is getting excluded . How can I exclude both the resources?

Also when I am trying to define a pattern on the HTTP protocol to silent, then also all the uri’s are being reported.

Thanks & Regards
Arpita

2 things:

  • silentUri doesn’t exclude anything, it removes from the reporting but HTTP traffic is generated. If you don’t want traffic to be generated, that’s what BlackList is for.
  • silentUri takes a regular expression. Feel to to match multiple domains.