【问题标题】:Gatling - How to use feeder in a post body which is using raw XML fileGatling - 如何在使用原始 XML 文件的帖子正文中使用 feeder
【发布时间】:2019-04-12 10:17:50
【问题描述】:

我需要在我的一个 gatling 脚本中使用原始 xml 文件作为正文。在这我们可以尝试喂食器。

尝试在原始文件中包含变量名。包括 scala 代码中的进纸器。这没有用。

这是scala中的代码

val feeder = csv("data.csv")

val scn = scenario("RecordedSimulation")
        .feed(feeder)
        .during(10 seconds)
        {
        exec(http("request_0")
            .post("/MED/01_WS/phoenixxm.asmx")
            .headers(headers_0)
            .body(RawFileBody("RecordedSimulation_0000_request.txt")))
            .pause(200.milliseconds)
        }

我们如何在 rawfilebody 实现中进行参数化

【问题讨论】:

    标签: gatling scala-gatling


    【解决方案1】:

    如果您想在文件中包含 Gatling 表达式并在发送时解析它们,您需要使用“ELFileBody”而不是“RawFileBody”

    【讨论】:

      猜你喜欢
      • 2019-02-10
      • 1970-01-01
      • 2022-08-18
      • 2016-06-22
      • 2016-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-08
      相关资源
      最近更新 更多