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.
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.