Gatling version: 3.12.0 (must be up to date)
Hello, I have a little function that I want to execute on generated simulation.log and stats.json after I finish the simulation, on Gatling there are hooks
but the hooks are before the log generated, as stated in doc:
Gatling starts
Simulation constructor is called, and all the code in the class body that is not delayed in the before and after hooks is executed.
before hook is executed
Simulation runs
Simulation terminates
-> after hook is executed //cannot be used due to HTML and json raw reports are generated in next step
-> HTML reports are generated if enabled
-> My desired code block in this step
Gatling shuts down
I have tried passing my method after setUp
as below, but the result will be shown in the beginning of the run, which is false:
...
...
setUp(DemoSimulation)
myMethod() //it fails here
Or weirder is to run scalac
and build another main
program just to execute my need, but that would be too absurd and time wasted.
Is there any flag or approach that I could use for this kind of problem ?