Hi,
I’m trying to loop the log in step in my scenario with several users (which are stored in a csv file). Feeder works fine. I put “repeat” action for looping and increment to get values in sequence [user1, user2, …, user(n)], but only the first value is being returned.
My script goes like this:
val userCredentials = csv(“user.csv”).circular
val userIdFeeder = Iterator.from(0).map(i => Map(“email” → i))
val iterations = 1;
val scn = scenario(“LoadTest”)
.feed(userIdFeeder)
.repeat(iterations, “index”){
exec(session => {
val userIdFeeder = session(“userIdFeeder”).as[Int]
val index = session(“index”).as[Int]
val email = iterations * userIdFeeder + index
session.set("${email}", “email”)
println("SESSION: " + session)
session
})
.feed(userCredentials)
.exec(http(“EnterCredentials”)
.post(uri1 + “/login.do”)
.headers(headers_2)
.formParam(“location”, " ")
.formParam(“email”, “${email}”)
.formParam(“password”, “${password}”))
//.pause(13)
}
Thanks in advance for your help.