Clone the repository
Clone the shared performance testing repository and switch to the supported branch.
git clone https://gitlab.com/bloombergindustrygroup/qe/performance/k6-ec2-performance.git
cd k6-ec2-performance
git checkout test
A shared, on-demand performance testing platform for teams — run k6 tests at scale on EC2 without building or maintaining your own infrastructure.
The QE Performance Test tool gives every team a common way to author and execute k6 performance tests. Tests live alongside shared configuration and utilities, deploy through the same Terraform-managed EC2 runner, and report into your own S3 bucket. Teams plug into a maintained platform instead of standing up perf infrastructure of their own.
Paired with QE's MCP servers, the platform also accelerates how new tests are written: an MCP-assisted prompt produces a k6 starter for the right category, which you then refactor against the shared helpers and validate locally before promoting to an EC2 run.
Teams get a shared performance testing platform instead of creating one.
.env, TEST_ENV, and category/test selectors.You do not need to build separate infrastructure per team.
scripts/run-tests.sh and scripts/deploy-to-ec2.sh.k6-tests/ with shared config/utilities.qa, dev, proto, beta, production).This guide explains how a new user can clone the repository, configure the project, run a k6 test through the framework, and verify that the output file is uploaded to S3.
The k6 Performance Tool supports MCP-assisted test generation and EC2-based execution. Teams can generate a starter k6 test using the QE MCP server, configure the required values, execute the test on EC2, and review the results in Amazon S3.
For the complete framework guide, refer to: k6 EC2 Performance Testing Framework – GitLab CI/CD with Terraform.
Repository (test branch):Before starting, make sure you have:
Follow these steps in order. Start with a small test load, then scale up after you confirm a successful EC2 run and S3 upload.
Clone the shared performance testing repository and switch to the supported branch.
git clone https://gitlab.com/bloombergindustrygroup/qe/performance/k6-ec2-performance.git
cd k6-ec2-performance
git checkout test
Use the QE MCP configuration at .vscode/mcp.json. The MCP
server can generate a starter k6 test based on the application,
endpoint, user flow, and load pattern. You can also select an
existing test under k6-tests/.
Generate a k6 spike test for the selected application.
Use TEST_ENV-driven URLs, environment variables for credentials,
shared configuration, functional checks, and latency thresholds.
Save the generated test under the appropriate folder inside
k6-tests/.
Before using an MCP-generated test, confirm that it does not contain hardcoded credentials or secrets and that it uses the shared framework configuration.
Copy the sample environment file to create your local
.env. This file stores runtime configuration, AWS
settings, and test credentials.
cp .env.example .env
.env fileOpen .env and set the required values. Example:
K6_RUN_MODE=ec2
AWS_REGION=us-east-1
AWS_PROFILE=default
TEST_ENV=beta
TEST_SIZE=small
K6_TEST_FILE=auth/login-blawauth.js
BLAW_USERNAME=your-username
BLAW_PASSWORD=your-password
S3_BUCKET_EAST=your-s3-bucket
Make sure that:
K6_RUN_MODE) is correctK6_TEST_FILETEST_ENV) is correctNever commit the .env file or real credentials to the repository.
List the available test files before running:
./scripts/list-tests.sh
Confirm that K6_TEST_FILE matches an available test.
Run the test locally first when possible to verify authentication,
environment URLs, shared helpers, checks, and thresholds before an
EC2 run.
Move to the Terraform directory and initialize providers:
cd tf
terraform init
Run plan with the correct environment file and review the output:
terraform plan -var-file=environments/sbx/terraform.tfvars
Confirm that the infrastructure changes look correct before applying.
Provision or update the AWS resources required for EC2-based k6 execution:
terraform apply -var-file=environments/sbx/terraform.tfvars
cd ..
Run the framework execution script:
./scripts/run-tests.sh
The framework will typically:
Watch the terminal output or GitLab CI/CD logs during the run. Confirm that:
After execution, open the configured S3 bucket and verify that the reports and logs are available.
Check:
Also review results for response times, request failure rate, checks pass rate, threshold failures, stability, and regressions.
The run is successful when:
.env was configured correctly.env file or real credentialsTEST_SIZE=small; increase load only after validating the initial runA new user should follow this sequence:
test branchk6-tests/.env from .env.example and update configuration values./scripts/list-tests.shterraform init, plan, and apply in tf/./scripts/run-tests.shYou can also use our MCPs to generate tests faster. See Step 2 above for the primary path; this section is a deeper reference.
api, auth, browser, load).k6-tests/<category>/.k6-tests/common/..env variables required by the generated test.Use a prompt structure like:
Generate a k6 <category> test for <service/endpoint or user flow>.
Environment: TEST_ENV-driven URLs.
Use shared config from k6-tests/common/config.js.
Use credentials from environment variables only.
Assertions: status, latency threshold, and key functional checks.
Output file: k6-tests/<category>/<test-name>.js.
Before merging an MCP-generated test, confirm:
TEST_ENV-driven configuration.