A JMeter based test runner for the CDP Platform.
Test suites are built automatically by the .github/workflows/publish.yml action whenever a change are committed to the main branch.
A successful build results in a Docker container that is capable of running your tests on the CDP Platform and publishing the results to the CDP Portal.
The performance test suites are designed to be run from the CDP Portal. The CDP Platform runs test suites in much the same way it runs any other service, it takes a docker image and runs it as an ECS task, automatically provisioning infrastructure as required.
You can run the entire performance test stack locally using Docker Compose, including LocalStack, Redis, and the target service. This is useful for development, integration testing, or verifying your test scripts before committing to main, which will trigger GitHub Actions to build and publish the Docker image.
docker compose build --no-cache developmentThis ensures any changes to entrypoint.sh or other scripts are picked up properly.
docker compose up --buildThis brings up:
development: the container that runs your performance testslocalstack: simulates AWS S3, SNS, SQS, etc.redis: backing service for cacheservice: the application under test
Once all services are healthy, your performance tests will automatically start.
In the docker-compose.yml, make sure to replace:
image: defradigital/service-name:${SERVICE_VERSION:-latest}with the actual name of your service’s image.
This is the service under test, which must expose a /health endpoint and listen on port 3000.
- S3 bucket is expected to be
s3://test-results, automatically created inside LocalStack. - Logs and reports are written to
./reportson your host. entrypoint.shshould contain the logic to wait for dependencies and kick off the test run.- The
depends_onhealthchecks ensure services likelocalstackandserviceare ready before tests start. - If you make changes to test scripts or entrypoints, rerun with:
docker compose up --builddocker build . -t my-performance-tests
aws --endpoint-url=localhost:4566 s3 mb s3://my-bucket
docker run \
-e S3_ENDPOINT='http://host.docker.internal:4566' \
-e RESULTS_OUTPUT_S3_PATH='s3://my-bucket' \
-e AWS_ACCESS_KEY_ID='test' \
-e AWS_SECRET_ACCESS_KEY='test' \
-e AWS_SECRET_KEY='test' \
-e AWS_REGION='eu-west-2' \
my-performance-tests
docker run -e S3_ENDPOINT='http://host.docker.internal:4566' -e RESULTS_OUTPUT_S3_PATH='s3://cdp-infra-dev-test-results/cdp-portal-perf-tests/95a01432-8f47-40d2-8233-76514da2236a' -e AWS_ACCESS_KEY_ID='test' -e AWS_SECRET_ACCESS_KEY='test' -e AWS_SECRET_KEY='test' -e AWS_REGION='eu-west-2' -e ENVIRONMENT='perf-test' my-performance-tests
THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:
http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3
The following attribution statement MUST be cited in your products and applications when using this information.
Contains public sector information licensed under the Open Government licence v3
The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.
It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.