Gatling - 如何在使用原始XML文件的帖子体中使用进纸器

问题描述 投票:0回答:1

我需要在我的一个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个回答
0
投票

如果你想在文件中加入Gatling表达式并在发送时解决它们,你需要使用'ELFileBody'而不是'RawFileBody'

© www.soinside.com 2019 - 2024. All rights reserved.