How do you use Gatling's checkIf method?

佐手、 提交于 2019-12-24 05:18:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!