【问题标题】:How Can I capture "HTTP Response" on Gatling script?如何在 Gatling 脚本上捕获“HTTP 响应”?
【发布时间】:2018-05-15 18:09:59
【问题描述】:

我需要在 Gatling 脚本中捕获“HTTP 响应”,包括响应代码、cookie、响应消息、响应正文等。 与 HTTP 请求关联的 HTTP 响应。我的加特林脚本中都需要。

【问题讨论】:

    标签: scala performance-testing httpresponse gatling scala-gatling


    【解决方案1】:

    这可以像下面这样完成

     http("Poll")
                    .get(Configuration.URL )
                    .queryParam("requestor", "Test")
                    .check(status.is(200))
                    .check(status.saveAs("statusCode")).check(xpath("//somerespone").saveAs("someresponse"))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-21
      • 2014-12-05
      • 1970-01-01
      • 1970-01-01
      • 2015-10-15
      • 1970-01-01
      • 1970-01-01
      • 2016-06-19
      相关资源
      最近更新 更多