我试图将值映射到templete。我正在测试web服务。我需要作为请求填充从第一个rest调用到另一个rest调用的响应。我正在做下面的事情。
第一个POST调用用粗体显示,我将响应保存为两个值。现在,我将这些值传递给另一个POST callBOLDED斜体。
我得到了下面的错误。请帮助解决这个问题,方法主体有太多的争论:
(bd:io.gatling.http.request.Body)io.gatling.http.request.builder.HttpRequestWithParamsBuilder
val授权=场景(“授权”) .feed(correlationIdFeeder) .feed(dataFeeder) .feed(csvFeeder) .exec(“创建具有外部令牌的tm令牌”) .post(tokenization_endpoint) .exec
**.check(status.is(200))** **.check(jsonPath("$.payment\_token").saveAs("payment\_token"))** .check(jsonPath("$.payment\_transaction\_id").saveAs("payment\_transaction\_id")) ) .exec( http("Authorization flow") .post(authorization\_endpoint) _**.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("Approved")) .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}")) )谢谢你穆拉里。
发布于 2015-08-27 09:57:35
2件事:
https://stackoverflow.com/questions/32225392
复制相似问题