user1459742
user1459742

Reputation: 11

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

Upvotes: 0

Views: 1309

Answers (1)

llatinov
llatinov

Reputation: 104

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}"))
}

Upvotes: 0

Related Questions