Menu
Scroll for more
This is documentation for the next version of Grafana k6 documentation. For the latest stable release, go to the latest version.
Open source
k6
The
k6 module contains k6-specific functionality.
| Function | Description |
|---|---|
| check(val, sets, [tags]) | Runs one or more checks on a value and generates a pass/fail result but does not throw errors or otherwise interrupt execution upon failure. |
| fail([err]) | Throws an error, failing and aborting the current VU script iteration immediately. |
| group(name, fn) | Runs code inside a group. Used to organize results in a test. |
| randomSeed(int) | Set seed to get a reproducible pseudo-random number using Math.random. |
| sleep(t) | Suspends VU execution for the specified duration. |
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video

Performance testing and observability in Grafana Cloud
Optimize user experiences with Grafana Cloud. Learn real-time insights, performance testing with k6, and continuous validation with Synthetic Monitoring.
Events

User-centered observability: load testing, real user monitoring, and synthetics
Learn how to use load testing, synthetic monitoring, and real user monitoring (RUM) to understand end users' experience of your apps. Watch on demand.