- Install Java: https://formulae.brew.sh/formula/openjdk
- Install Maven: https://formulae.brew.sh/formula/maven
- Install Intellij: https://www.jetbrains.com/idea/download/?section=mac
To kick off the load tests you will need to do the following:
- Port forward to Access the DEV RDS Database
- Go to
Manage a workforce Dev
web application and grab theconnection.sid
cookie's value:
- Go here in Google Chrome: https://workforce-management-dev.hmpps.service.justice.gov.uk
- Log in
- Right-click browser > Inspect
- Go to
Application
tab >Storage
in left nav > ExpandCookies
- Find the
connect.sid
cookie in the list and copy its' value from theValue
column - Copy the value for later step
- Open repo in IntelliJ
- Go to
AllocateCaseSimulation.kt
and set the concurrent user and during functions to ensure you are running the correct load against the APIs.
- For example 1 user for 1 second would be
users.injectClosed(constantConcurrentUsers(1).during(1))
- Right-click on
Engine.kt
class >Run Engine
- This will fail as missing env vars
- Add missing env vars to
Engine
configuration:
- Click on the
Engine
configuration that now exists next to theRun
button on the top panel in Intellij - Click on
Edit Configurations
- Paste this into the
VM options
box (and swap out variables below for real values - seePrep for running load test
for how to get the value forauth_cookie_value
and the rest our k8s secrets):-DconnectSidCookieValue=<auth_cookie_value> -Ddb_name=<db_name_value> -Ddb_password=<db_password_value>
- Change directory in a terminal and navigate to this repo's root folder
- Run this command (and swap out variables below for real values - see
Prep for running load test
for how to get the value forauth_cookie_value
and the rest our k8s secrets):
./gradlew gatlingRun-uk.gov.justice.digital.hmpps.maw.gatling.simulations.AllocateCaseSimulation -DconnectSidCookieValue=<auth_cookie_value> -Ddb_name=<db_name_value> -Ddb_password=<db_password_value>