PreTest/PostTest tasks, i.e. before() and after() tasks in Simulation execution

Hello Gatling Explores/Experts,

I have a requirement to run set of as shell commands/Java methods before executing my Simulation and another set of shell/Java methods after completing the Simulation. I use Gatling Java 3.9.0 and my Simulation setup looks like below. Unfortunately the before() and after() blocks doesn’t let me add any statements.

Any idea how I can get this setup working? Highly appreciate all your thoughts. Thanks.

public class BaselineSimulation extends Simulation {
  ConsumerJourney consumerJourney = new ConsumerJourney();
      // need pre test tasks to run here
      // need post test/cleanup tasks run here.

Kind regards


Please properly read the documentation: Gatling - Simulation

In Gatling Java, these are methods to override.

Ah, Thanks Stéphane.

yes, I should have read the documentation before posting here.