【发布时间】:2015-11-20 10:05:07
【问题描述】:
我正在尝试将值映射到模板。我正在测试网络服务。我需要填充从第一个休息呼叫到另一个休息呼叫的响应作为请求。我在下面做。
第一个 POST 调用 [BOLDED],我将响应保存为两个值。现在我将这些值传递给另一个 POST 调用[BOLDED ITALIC]。
我收到以下错误。请帮助解决这个问题 方法体的参数太多:
(bd:io.gatling.http.request.Body)io.gatling.http.request.builder.HttpRequestWithParamsBuilder
val 授权 = 场景(“授权”)
.feed(correlationIdFeeder)
.feed(dataFeeder)
.feed(csvFeeder)
.exec(
http("在给定外部令牌的情况下创建 tm 令牌")
.post(tokenization_endpoint)
.body(ELFileBody("tokenization.json")).asJSON
.check(status.is(200))
.check(jsonPath("$.payment_token").saveAs("payment_token"))
.check(jsonPath("$.payment_transaction_id").saveAs("payment_transaction_id"))
)
.exec(
http("授权流程")
.post(授权端点)
.body(ELFileBody("authorization.json"), Map("payment_token" -> "${payment_token}", "payment_transaction_id" -> "${payment_transaction_id}", "transaction_date" -> " ${current_date}", "value" -> "${amount}" ) ).asJSON
.check(status.is(200))
.check(jsonPath("$.transaction_details.transaction_status").is("已批准"))
.check(jsonPath("$.transaction_details.transaction_status_code").is("0x20"))
.check(jsonPath("$.transaction_details.payment_token").is("${payment_token}"))
.check(jsonPath("$.transaction_details.payment_transaction_id").is("${payment_transaction_id}"))
.check(jsonPath("$.transaction_details.transaction_date").is("${current_date}"))
)
谢谢你 壁画。
【问题讨论】:
标签: gatling