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();
  {
    before(
      // need pre test tasks to run here
    );
    setUp(
       consumerJourney.getLoginLogoutJourney();
    )
 .assertions(assertionHelper.getResponseTimeAssertions());
    after(
      // need post test/cleanup tasks run here.
     );
   }
}

Kind regards

Pujitha

Please properly read the documentation: https://gatling.io/docs/gatling/reference/current/core/simulation/#hooks

In Gatling Java, these are methods to override.

Ah, Thanks Stéphane.

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