Menu
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
In this webinar, learn how Grafana Cloud k6 offers you the best developer experience for performance testing.
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.