feature wish: allow DSL for warmUp()

In my case I need to call a DELETE for cleanup and set initial values to session, but the warmUp() only takes an URL as String.

Two feature wishes in one:

  1. allow DSL for warmUp
  2. clone warmUp session for each user to copy default settings

example:

val httpConf = httpConfig
.baseURL(“https://localhost/rest”)
.warmUp() {
exec(
http(“cleanup data”)
.delete("/cleanup")
.basicAuth(userName, userPassword)
.check(status.is(200)))
.exec(session =>
session.setAttribute(“defaultFoo”, “bar”))
}

Regards Danny

The warm up is actually used for warming up the HTTP engine, not the user.
It's only called once, not once per user.

IHMO, restoring state is not the responsibility of the stress tool. That's
no standard process, one might have to clean up a database, a filesystem,
reboot some server, etc. I personally build dedicated scripts for this,
apart from the stress test scripts, and build a top level script in charge
of calling the clean up script and the stress test script sequentially.

In your case, you can build a Gatling clean up script, run it with -nr (no
reports) option, and then run your real stress tests.

WDYT?

Stéphane

Sounds like a solution to me.

So I do:
gatling -nr -s pack.CleanupSimulation – doing the data cleanup
gatling -nr -s pack.SetupSimulation – creates the relevant data
gatling -s pack.LoadSimulation – runs the load test

There is just the thing, I need to check before LoadSimulation if my SetupSimulation went fine, otherwise it don’t need to start.

Regards Danny

We're currently working on having Gatling have acceptance criteria, but
it's not ready yet.

Sorry to bother you, but how do I configure running of two (or more) gatling simulations via maven?

Have you tried to set up multiple executions?

Not yet, but it is a good keyword to search the maven docu for (I will do today :-).