I have a test scenario like this:
request 3 different url as load balance, and every url must with a different header.
How could I do this? Thank you.
scripts:
val httpProtocol = http.baseURLs(
"http://127.0.0.132:8080/v1/AUTH_test2",
"http://127.0.0.163:8080/v1/AUTH_test2",
"http://127.0.0.72:8080/v1/AUTH_test2")
val headers_1 = Map("X-Auth-Token" -> "AUTH_tkc3b4bbc0b8384a25b8f1ba03409893f2")
val headers_2 = Map("X-Auth-Token" -> "AUTH_tkd998f7ce72e94f52bb03e93e2d7cf152")
val headers_3 = Map("X-Auth-Token" -> "AUTH_tk88fd3003d5804d39af58b37d9d774251")
val scn1 = scenario("swift")
.repeat(3) {
exec(
http("创建container")
.put("/myfiles1")
.headers(headers_1))
.pause(2)
}
setUp(
scn1.inject(atOnce(1 user))
).protocols(httpProtocol)