What is the proper way to start gatling from a standalone application

I need to run a Gatling simulation from the main application. The use case is as follows:

  • The application reads the specification and generates test cases based on this specification.
  • Test cases are converted to Gatling scripts.
  • Scripts run in a Gatling simulation.

So far I have managed to do this through the sbt plugin. However, this is inconvenient if we want to reuse a tool that I am developing in other contexts (for example, imagine scala projects).

Since I generate Gatling scripts dynamically, this means that I cannot just pass the Scala class to the Gatling binary.

I managed to run the simulation as follows:

Gatling.fromArgs(args, Some(classOf[Simulation]), _ => new ValidationTest)

Where ValidationTestis a class that dynamically generates scripts. However, I'm not sure if this is the right way to use Gatling in a standalone application.

+4
source share

Source: https://habr.com/ru/post/1649882/


All Articles