如何使用加特林的checkIf方法? [英] How do you use Gatling's checkIf method?

查看:174
本文介绍了如何使用加特林的checkIf方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处中有记载,Gatling的checkIf方法用于条件检查.它在ScenarioBuilder的流畅API上不可用,但是我可以在CheckSupport类中看到它.我搜寻了互联网,找不到一个示例.

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.

我正在使用加特林2.3.1.

I'm using Gatling 2.3.1.

推荐答案

我发现

I found an example in their unit tests as follows:

http("untypedCheckIf").get("/")
      .check(
        checkIf("${bool}") {
          jsonPath("$..foo")
        }
      )

这篇关于如何使用加特林的checkIf方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆