Gatling - Set Request name dynamically

15 views
Skip to first unread message

roman....@gmail.com

unread,
Jun 19, 2018, 7:58:57 AM6/19/18
to Gatling User Group

Can I define a rquest name dynamically? I tried that with http(s"/product${prID}"but I am getting an error (variable prID not found):

    val searchByProductIdTask = exec(http(s"/product${prID}")
        .post(appURL + "/api/product/search")
        .headers(jsonHeader)
        .body(StringBody(my_string_body)).asJSON
        .check(status.is(200), responseTimeInMillis.lessThan("${expectedResponseTime}"))
    ).pause(5)

Ethen

unread,
Jun 22, 2018, 4:37:36 AM6/22/18
to Gatling User Group
try to remove  's' before "/product${prID}"

在 2018年6月19日星期二 UTC+8下午7:58:57,roman....@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages