k6
Test automation · Free
A load-testing tool with scripts and metrics: it helps model API load and check performance thresholds in CI.
Also known as: grafana/k6; load-test-k6; grafana-k6; k6-load-testing

What you can use for free
Code and local use under AGPL-3.0.
Paid features and costs
Computing resources, self-hosting, and external services are paid for separately if used.
Access and limitations
Code and local use under AGPL-3.0. Computing resources, self-hosting, and external services are paid for separately if used.
Use cases
- Test API performance under load
- Define load and performance thresholds, then run a test in a test environment
Example workflow
A possible workflow; this is not a report of hands-on testing.
Test API performance under load.
Before you start
- One important workflow and its expected result.
- A test environment with controlled data.
Steps
- Define a user HTTP scenario and input dataset.
- Define load and performance thresholds, then run a test in a test environment.
- Run the check locally and save the report in CI.
Check your result
- The check detects a deliberately broken workflow.
- The result can be reproduced without depending on a personal session.
Choosing k6
Test API performance under load
Choose this when
- Test API performance under load
- Define load and performance thresholds, then run a test in a test environment
Requirements
- Group a metric's conditions in a thresholds array rather than repeating the property name in a JavaScript object.
Things to consider
- Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
- Terms of use: AGPL-3.0 for the code; copyleft obligations apply to a modified version accessed over a network.
- Duplicate thresholds keys can silently override an earlier condition and lose some pass criteria.
Frequently asked questions
What can you use for free in k6?
Code and local use under AGPL-3.0.
What additional costs might arise with k6?
Computing resources, self-hosting, and external services are paid for separately if used.
What terms of use matter for k6?
AGPL-3.0 for the code; copyleft obligations apply to a modified version accessed over a network.
How do you get started with k6?
Define a user HTTP scenario and input dataset. Define load and performance thresholds, then run a test in a test environment. Run the check locally and save the report in CI.
How does k6 check multiple thresholds for one metric?
Set an array of expressions under one metric name, such as limits for different percentiles. The documentation warns against duplicate keys: JavaScript retains the last entry. A breached threshold makes the test exit with a nonzero code.
License
AGPL-3.0 for the code; copyleft obligations apply to a modified version accessed over a network.
AGPL 3.0 — copyleft with a network-service condition
Use, modification, and commercial use cases are permitted. GPL obligations apply to distribution. If you modify an AGPL-covered program and let users interact with it over a network, you must offer them the corresponding source code for that version. This applies to the covered program, not automatically to all your data or independent applications.
License termsTechnologies and topics
- k6
- test
- Development