I save a list of values from a response ${valueList} (value1, value2, ..) and need to send it in another requests body. All values share the same key "id".
Right now I'm sending the values one by one but it takes too long since the list can have thousands of values.
.foreach("${valueList}", "value"){
.exec(http("Request1")
.post("/app/common/Confirm.jspx")
.formParam("id", "${value}")
)}
or
.exec(http("Request1")
.post("/app/common/Confirm.jspx")
.formParam("id", "${value(1)}")
.formParam("id", "${value(2)}")
.formParam("id", "${value(n)}")
)
Raw output that is generated by this:
id=value1&id=value2&id=value3&...
Can someone suggest a way to set the whole list of values in the body without accessing and setting each value individually?
.multivaluedFormParam should give you what you want
.exec(http("Request1")
.post("/app/common/Confirm.jspx")
.multivaluedFormParam("id", "${valueList}")
)