user1459742 February 2016

Gatling test forever using feed

I have a kafka simulation test using Gatling and currently we are able to run with the constantUsersPerSec for a given duration. But we wanted to run this simulation at constantUsersPerSec (say some 1000/sec) and this test should be running forever until somebody kills the test/process.

Currently we have adjusted to use days in place of duration. But is there an option to run a test forever that uses a feeder. Here is the code snippet:

val scn = scenario("Kafka Test Demo")
    .feed(ssv(conf.getString("filename"), true).circular)
    .exec(kafka("request")
      // message to send
      .send[String]("${t}"))
  setUp(
    scn.inject(constantUsersPerSec(conf.getInt("constantUsersPerSec")) during (conf.getInt("run_duration_in_mins") hours)))
    .protocols(kafkaConf)

Any suggestions/directions please?

many thanks, mpha

Answers


llatinov February 2016

Is code bellow going to work?

val scn = scenario("Kafka Test Demo")
    .feed(ssv(conf.getString("filename"), true)).circular.forever() {
    exec(kafka("request")
    // message to send
    .send[String]("${t}"))
}

Post Status

Asked in February 2016
Viewed 3,329 times
Voted 13
Answered 1 times

Search




Leave an answer