Hi,
I am trying to get a token through http rest calls, which i have written as a scenario. The scenario is as below.
val RenewToken = scenario("Renew Token before expiry")
//Generating token
.repeat(5)
{exec(http("Renew Token")
.get("token")
.basicAuth(cdapusername,cdappassword)
.check(jsonPath("$.access_token").saveAs("token")))}
//.repeat(5)
.exec(session=> {
token = session("token").as[String]
println(token)
session}).pause(30 seconds)
setUp(
RenewToken.inject(atOnceUsers(1)).protocols(httpConfss)
)
I want to repeat the scenario RenewToken as many times as i want with a pause of 30 seconds and both the exec has to be repeated every time. Can somebody suggest on how i can do that? is there a way from setup i can repeat the scenario with regular intervals of time?
Thanks,
Rohini