Performance test suite for the Marginal Relief Calculator Frontend
, using performance-test-runner under the hood.
Prior to executing the tests ensure you have:
- Docker - to start mongo container (Note - there are other ways to run Docker on the command line so this command may be different)
- Installed/configured service manager
Run the following command to start the services locally:
docker run --rm -d --name mongo -d -p 27017:27017 mongo:4.0
sm2 --start MARGINAL_RELIEF_CALCULATOR_ALL -r --wait 100
Using the --wait 100
argument ensures a health check is run on all the services started as part of the profile. 100
refers to the given number of seconds to wait for services to pass health checks.
The template uses logback.xml to configure log levels. The default log level is WARN. This can be updated to use a lower level for example TRACE to view the requests sent and responses received during the test.
It might be useful to try the journey with one user to check that everything works fine before running the full performance test
sbt -Dperftest.runSmokeTest=true -DrunLocal=true gatling:test
sbt -DrunLocal=true gatling:test
sbt -Dperftest.runSmokeTest=true -DrunLocal=false gatling:test
To run a full performance test against staging environment, implement a job builder and run the test only from Jenkins.
This repository uses Scalafmt, a code formatter for Scala. The formatting rules configured for this repository are defined within .scalafmt.conf.
To apply formatting to this repository using the configured rules in .scalafmt.conf execute:
sbt scalafmtAll
To check files have been formatted as expected execute:
sbt scalafmtCheckAll scalafmtSbtCheck
Visit the official Scalafmt documentation to view a complete list of tasks which can be run.