Hello all!
I am trying to run the following scenario reading from a CSV file:
Given an endpoint1 from the API1 and an endpoint2 from the API2
Submit a request on the endpoint1 using the
fetch a output value from the endpoint1’s response
And then submit a request on endpoint2 using the output value fetched previously
The problem I have is I do not know how to use 2 different protocols:
- I have tried:
protocols(protocol1, protocol2)
but I get the following error:Duplicate key class io.gatling.http.protocol.HttpProtocol
setUp(
scn1.injectOpen(atOnceUsers(1))
).protocols(protocol1, protocol2)
And the protocols are defined as:
Protocol 1
HttpProtocolBuilder httpProtocol = http
.baseUrl(URL1)
.acceptHeader("application/json")
.contentTypeHeader("application/json; charset=utf-8")
.acceptLanguageHeader("en-GB,en-US;q=0.9,en;q=0.8")
.authorizationHeader(BASIC_AUTH);
Protocol 2
HttpProtocolBuilder httpProtocol = http
.baseUrl(URL2)
.acceptHeader("application/json")
.contentTypeHeader("application/json; charset=utf-8")
.acceptLanguageHeader("en-GB,en-US;q=0.9,en;q=0.8")
.authorizationHeader(BASIC_AUTH);
Any thoughts?
Kind Regards