A k6 extension that recreate HTTP requests, which you can make more complicated requests. Phase 1 implementation of new-http api design for k6. For more information see this issue and this one
To build a custom k6
binary with this extension, first ensure you have the prerequisites:
- Go toolchain
- Git
-
Download xk6:
go install go.k6.io/xk6/cmd/xk6@latest
-
xk6 build --with github.com/saniyar-dev/xk6-net
The
xk6 build
command creates a k6 binary that includes the xk6-net extension in your local folder. This k6 binary can now run a k6 test using xk6-net APIs.
To make development a little smoother, use the Makefile
in the root folder. The default target will format your code and create a k6
binary with your local code rather than from GitHub.
git clone https://github.com/saniyar-dev/xk6-net.git
cd xk6-net
make