Simulations can be run locally using Gradle. ./gradlew gatlingRun
Note: By default the simulation would run for Standard traffic. Please set
LOAD_SIMULATION_TYPEenv variable toHighorPeakto simulate other traffic conditions
Standard
export LOAD_SIMULATION_TYPE='Standard' && ./gradlew gatlingRun
High export LOAD_SIMULATION_TYPE='High' && ./gradlew gatlingRun
Peak export LOAD_SIMULATION_TYPE='Peak' && ./gradlew gatlingRun
- JDK 11
- Scala 2.13
- Gatling - Async Scala-Akka-Netty based -
- Gradle Wrapper is already packaged, so you don't need to install Gradle (a JDK > 11 must be installed and $JAVA_HOME configured)
- Minimal
build.gradleleveraging Gradle wrapper andio.gatling.gradleplugin
📁 api
- All HTTP requests responsible to make API calls to OMRS
📁 configurations
Possibility: Base object to represent possible variants of various User flowsProtocol: http protocol for running simulationsTrafficConfiguration: Contains 3 configurable load configurations such as Standard, High and PeakFeeders: csv data Feeders
📁 registries
- Domain object registry that represents various functions performed by the user
📁 scenarios
- Closed System for simulating constant traffic of concurrent users
// Simulate 10 concurrent users traffic for 5 minutes with initial ramp of 30 seconds
rampConcurrentUsers(0).to(10).during(30 seconds),
constantConcurrentUsers(10).during(5 minutes)📁 simulations
- Current suit supports Bhamni Clinic simulation
- Following
closed systemconcurrent user configurations are defined inTrafficConfiguration
| Load Type | Concurrent Users | Duration | Initial Ramp Duration |
|---|---|---|---|
| STANDARD | 40 | 3 minutes | 30 seconds |
| HIGH | 50 | 5 minutes | 30 seconds |
| PEAK | 70 | 10 minutes | 30 seconds |
To get an idea how this behaves, have a look at this visual representation of a capacity load test:
- Gets triggered on push to master branch.
- The
workflow-dispatchtrigger could be utilised to generate performance test report based on suitableLOAD_SIMULATION_TYPE. - The workflow performs the following steps :
- Building the project
- Running performance test based on the
LOAD_SIMULATION_TYPE - Removing older reports (keeps hold of latest 10 reports)
- Publishing reports
- Uploading the artifact (latest performance report) and
- Posting Slack notification containing Success/Failure message and link to the published report on successful workflow.
