问题
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.
回答1:
I found an example in their unit tests as follows:
http("untypedCheckIf").get("/")
.check(
checkIf("${bool}") {
jsonPath("$..foo")
}
)
来源:https://stackoverflow.com/questions/51328868/how-do-you-use-gatlings-checkif-method