K6 is an open-source tool widely used for load testing. With Keptn’s Quality gates, we can automate the process of evaluating the results of the test and also monitor them. Keptn already has support for JMeter, Locust, Litmus Chaos, and others. This project will enable users to use K6 for performance testing.
In this tutorial we run standard K6 tests using Job Executor Service of Keptn. Please find the tutorial here.
After running standard K6 in JES, we make use of K6 extensions for writing test metrics to extenal source. We'll use Prometheus remote write K6 extension. Please find the tutorial here.
Once we have K6 tests metrics written in Prometheus, we can use Keptn's Quality Gates evaluation for SLO compliance. Please find the tutorial here.
There were two ways of implementing this integration
- Using Job Executor Service
- Having a Custom Keptn Service
We decided the Job Executor Service will be sufficient to deliver all the features. More information regarding this discussion can be found in this GitHub issue.
Altough we decided to go ahead with JES, the template for listening to sh.keptn.event.test.triggered
CloudEvent and sending sh.keptn.event.test.started
and sh.keptn.event.test.finished
CloudEvents. The service could be run using Helm Charts.
This repository contains details about my work in Google Summer of Code 2022.