Conditional statements
**only 2 chains/methods are possible**
with randomSwitch and uniformrandomswitch ?.
I want to run the below chains in the random manner I have tried the below scenarios with randomSwitch and uniformrandomswitch . but only first two methods are getting executed.
how to execute the below all methods in random basis… could you please guide us.
def WS_Post_Sensors_API =
exec(http("WS_Post_Sensors_API")
.post("https:......")
.headers(headers)
.check(status.is(200)))
.pause(1 second)
def WS_Post_Sensors_API_Compression =
exec(http("WS_Post_Sensors_API_Compression")
.post("https:......")
.headers(headers1)
.check(status.is(200)))
.pause(1 second)
def WS_Post_Sensors_API_Compression_payload =
exec(http("WS_Post_Sensors_API_Compression")
.post("https:......")
.headers(headers1)
.body(StringBody("""{"filters":{"vehicle":{"tId":["3456"]}}}""")).asJSON
.check(status.is(200)))
.pause(1 second)
val scn = scenario("Titan_Post_Sensor_API") .during(2 minutes) {
exec(Read_HDAS_Data,Hdas_Token).exec(
// .exec(Read_HDAS_Data, WS_Post_Sensors_API)
randomSwitch(
5.0 -> WS_Post_Sensors_API,
90.0 -> WS_Post_Sensors_API_Compression,
5.0 -> WS_Post_Sensors_API_Compression_payload)