Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you use Gatling's checkIf method?

Documented here, Gatling's checkIf method is intended for conditional checking. It's not available on ScenarioBuilder's fluent API but I can see it in the CheckSupport class. I have scoured the internet and cannot find a single example.

I'm using Gatling 2.3.1.

like image 631
Robert Bain Avatar asked Dec 10 '22 06:12

Robert Bain


1 Answers

I found an example in their unit tests as follows:

http("untypedCheckIf").get("/")
      .check(
        checkIf("${bool}") {
          jsonPath("$..foo")
        }
      )
like image 139
Robert Bain Avatar answered Feb 22 '23 17:02

Robert Bain