Documentation Index
Fetch the curated documentation index at: https://grafana_com_website/llms.txt
Fetch the complete documentation index at: https://grafana_com_website/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: /docs/k6/next/testing-guides/injecting-faults-with-xk6-disruptor/installation.md (append .md) or send Accept: text/markdown to /docs/k6/next/testing-guides/injecting-faults-with-xk6-disruptor/installation/. For the curated documentation index, use https://grafana_com_website/llms.txt. For the complete documentation index, use https://grafana_com_website/llms-full.txt.
This is documentation for the next version of Grafana k6 documentation. For the latest stable release, go to the latest version.
Installation
xk6-disruptor is a k6 extension. You have to run a k6 version built with the disruptor extension to use the disruptor APIs in your k6 tests.
The following sections explain the different options to get this custom binary.
Download a release binary
The quickest way to get started is to download a release binary from GitHub.
Build from source
You can also use xk6 to build a k6 binary.
To learn more about xk6, refer to Build a k6 binary using Go.
To build the k6 binary with the xk6-disruptor extension:
# Install xk6
go install go.k6.io/xk6/cmd/xk6@latest
# Clone the xk6-disruptor code
git clone https://github.com/grafana/xk6-disruptor.git
cd xk6-disruptor
# Build the custom binary
xk6 build --output xk6-disruptor --with github.com/grafana/xk6-disruptor=.xk6 will create the xk6-disruptor binary in the current working directory.
Was this page helpful?
Related resources from Grafana Labs

