Load testing with Grafana k6 and CI/CD integration
I make load testing part of your development process: tests live in the repository next to the code, run in the pipeline and block a release when performance regresses.
What I do
-
1.Workload modeling
I derive realistic scenarios, request rates and peaks from production logs and metrics. Performance targets are defined as SLOs: p95 and p99 latency, error rate and throughput.
-
2.Tests as code
Scenarios in JavaScript or TypeScript, test data generators, shared modules. HTTP, gRPC and WebSocket, plus Kafka and custom protocols through Go extensions.
-
3.CI/CD integration
A short smoke test on every merge request and a full run on a schedule or before a release. Thresholds turn into an exit code, so the pipeline in GitLab CI or GitHub Actions fails on a regression.
-
4.Metrics and release comparison
Results go to Prometheus and Grafana next to your system metrics, so you can see which release slowed the service down and on which endpoint.
What you get
- A repository with tests, test data generators and documentation.
- Pipeline jobs with thresholds agreed with the team.
- A Grafana dashboard for test runs and release comparison.
- Knowledge transfer: your team can write new scenarios and analyze the results independently.
The engagement follows the same steps as other projects: consultation, agreement on success criteria, measurements and tests, and delivery of the report and code. See how I work.
Why k6
k6 tests are written as code, go through code review and are reused like any other code. The load generator is written in Go and is resource-efficient, so a single machine can run thousands of virtual users. k6 can be extended with Go modules: that is how I built xk6-sip for telephony testing, which is listed in the official Grafana k6 extension registry.
Write-ups (in Russian, on Habr):
FAQ
Won't load tests slow down the pipeline?
Not if the runs are split. Every merge request gets a short test of a few minutes covering the key scenarios. Soak and peak load tests run separately, on a schedule or before a release.
Can we migrate to k6 from JMeter?
Yes, gradually. Scenarios are migrated in order of priority, and the results of the old and new tests are compared on the same environment. Both suites can run side by side until the migration is complete.
Do we need a paid Grafana Cloud plan?
No. k6 is open source, tests run on your own CI runners and metrics go to your own Prometheus. Grafana Cloud can be added later if you need distributed test runs.
How long does the implementation take?
It depends on the number of scenarios and how ready the test environment is; the timeline is fixed in the contract after the consultation. I work iteratively: one key scenario reaches the pipeline first, then the rest are added.
How much does it cost?
The initial consultation is $100. We go through your system and the task, and afterwards I quote the cost and timeline. The price is fixed in the contract before work starts.
Other services: Performance audit · SIP/VoIP and PBX load testing · Monitoring with Prometheus and Grafana · all services.