grafana/k6
k6 is a modern load-testing tool, built on our years of experience in the performance and testing industries. It provides a clean, approachable scripting API, local and cloud execution, flexible configuration, with command & control through CLI or a REST API.
This is how load testing should look in the 21st century.
latest
: the latest released version of k6.latest-with-browser
: the latest released version of k6 with Browser API enabled.master
: current build of k6 master
branch.master-with-browser
: current build of k6 master
branch with Browser API enabled.vX.Y.Z
: every released version of k6 is is available via a vX.Y.Z
tag, e.g. to use k6@v0.46.0
use grafana/k6:v0.46.0
.vX.Y.Z-with-browser
: starting from v0.46.0
every k6 image is accompanied by an image that includes Chromium browser and has Browser API enabled. Due to their size and privileges requirement (see "A note on running browser tests" below), they are provided as separate tags with -with-browser
suffix. That is, to run your browser-based test with k6@v0.46.0
use the grafana/k6:v0.46.0-with-browser
image..har
files and directly convert them to k6 scriptsThere's even more! See all features available in k6 docs
See the Docker examples in the Running k6 guide to learn how to run tests using the grafana/k6
images.
When running browser tests using the *-with-browser
images, you'd need to provide additional capabilities to the container due to k6
running Chrome in a sandbox mode:
curl -o chrome.json https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json
docker run --rm -i --security-opt seccomp=$(pwd)/chrome.json grafana/k6:latest-with-browser - <script.js
SYS_ADMIN
capability when running a container:
docker run --rm -i --cap-add=SYS_ADMIN grafana/k6:latest-with-browser - <script.js
docker pull grafana/k6