This is a simple framework for Gatling Frontline using JavaFaker for data generation, implemented in Scala with Maven.
- Clone the repository.
- Navigate to the project directory.
- Open the project in IntelliJ IDEA.
- Set environment variables in IntelliJ:
- Go to
Run
->Edit Configurations...
- Select your simulation configuration.
- Add
BASE_URL
environment variable with your base URL.
- Go to
- Run the simulations using the Maven lifecycle or directly from IntelliJ.
gatling-javafaker-maven/
├── src/
│ ├── main/
│ │ ├── scala/
│ │ │ ├── services/
│ │ │ │ └── UserService.scala
│ │ │ └── util/
│ │ │ └── DataGenerator.scala
│ ├── test/
│ │ ├── scala/
│ │ │ └── simulation/
│ │ │ └── UserSimulation.scala
│ │ ├── helpers/
│ │ │ └── Engine.scala
│ ├── resources/
│ │ ├── config/
│ │ │ └── UserConfig.conf
│ │ ├── images/
│ │ │ └── IntelliJ.png
│ │ │
├── pom.xml
└── README.md
src/main/scala
: Contains the main code (config, service, util).src/test/scala
: Contains the Gatling simulations.
- Gatling
- JavaFaker
To run the UserSimulation
, use the following command:
mvn gatling:test
Example
To run the UserSimulation
, use the following command: