Performance testing with Grafana Cloud k6
Grafana Cloud k6 is a performance-testing application in your Grafana Cloud instance powered by k6 OSS. k6 is an open source load testing tool designed for developers to allow teams to create tests-as-code, integrate performance tests as part of the software development lifecycle, and help users test, analyze, and fix performance issues in their applications.
Grafana Cloud k6 lets you leverage all of k6 capabilities, while Grafana handles the infrastructure work of scaling servers, handling distributed load zones, and storing and aggregating metrics from your tests.
This documentation describes everything you need to know to author, run, analyze, and manage load tests in Grafana Cloud k6.
For a high-level picture of why you might want to use Grafana Cloud k6, continue reading this page. For a quick tutorial, go to Get started to run your first test.
A unified platform to prevent, monitor, and diagnose performance issues
Dashboards and performance tests share a common purpose: increased system reliability. However, these two tools focus on different aspects of reliability. Performance tests try to create conditions to uncover issues, and dashboards monitor systems so that, when issues do occur, they’re visible.
Grafana Cloud k6 joins two complementary tools in the same platform. The k6 app in Grafana Cloud also has complementary features to enhance k6 OSS. A holistic approach to reliability brings several benefits:
Compare client and system metrics in a single pane of glass.
With k6, you can write load tests to catch performance issues before they enter production. With Grafana, you can visualize and compare test results to other system metrics. Together, the tools help you see both sides of what happens when your system is under load.
Bring teams and data together.
Since the k6 app comes with Grafana Cloud, your testing team can share a platform with everyone who uses your Grafana stack. That opens new opportunities for collaboration, communication, and discovery.
For example, engineering teams might correlate results with panels initially used only by DevOps teams. On the other end, since tests can be run directly from Grafana Cloud, you could write a test that other developers could re-use to test for regressions after each significant commit.
Diagnose known failure conditions
You can also use the k6 app with Grafana to diagnose why systems fail under certain conditions. Create a script that reproduces the behavior that you expect to cause failure, then run it with increasing load as you monitor your metrics.
Powered by k6 OSS
Tests in Grafana cloud k6 run on k6 OSS.
k6 is an open source performance testing tool written in Go. It’s designed to be full-featured, generate load efficiently, and, above all, provide excellent developer experience.
A few of k6 major features are:
- Execution engine: The engine infrastructure generates load to simulate network traffic for all types of events.
- Extensions: The extension ecosystem extends k6 for new protocols and data outputs.
In almost all cases, you can run the same tests locally or in Grafana Cloud. Rather than lock you in, Grafana Cloud k6 enhances and complements your local performance tests.
When you run tests on Grafana Cloud k6 servers, Grafana handles the following infrastructure work for you:
- Auto-scaling huge tests
- Distributing tests across different geographic zones
- Storing and aggregating massive amounts of test metrics
- Maintaining and developing a frontend
For a glimpse of the development work that managing this infrastructure requires, read Peeking under the hood of k6 Cloud.
A testing frontend for your organization
Besides visualization and infrastructure, Grafana Cloud k6 enhances the command-line application with graphical interfaces to build, analyze, and manage tests.
- The Test Builder, a graphical interface to create performance tests.
- Cloud scripting extras for enhanced capabilities to run tests and filter results.
- Performance insights to alert you about issues in your script or system under test.
- Portable test results panels to add to other dashboards.
- Detailed analysis of different test metrics.
There are a few different paths you can choose to create your first performance test: