I have a CSV file which has around 10K entries (request payloads for my session). I am using the built-in CSV feeder to loop through all of them in my request. But only the number of requests corresponding to number of users in the test is executed. I would like that the whole feed be executed.
For example if I have 10 users, then only the first 10 records of my CSV are fetched during runtime.
This is my code:
val rqstFeeder = csv("rqst.csv")
val user = ConfigFactory.load().getInt("app.loadVariables.user")
var URL: String = ConfigFactory.load().getString("app.loadVariables.URL")
val httpProtocol = http
.header(HttpHeaderNames.Accept, HttpHeaderValues.ApplicationJson)
.inferHtmlResources()
object GSLBRequest {
val getData =
exec(
http("Get GSLB Data")
.post(URL)
.body(StringBody(ConfigFactory.load().getString("app.loadVariables.body"))).asJSON
.check(status.is(200))
)
}
val customInject = constantUsersPerSec(user) during (5 seconds)
val source = scenario("GSLB Endpoint")
.feed(rqstFeeder)
.forever(exec(GSLBRequest.getData)).inject(customInject);
)
setUp(source)
.protocols(httpProtocol).maxDuration(30 seconds)