Releases: grafana/xk6-python
Releases · grafana/xk6-python
v0.1.2
xk6-python v0.1.2 is here 🎉!
This is a minor maintenance release with dependency updates and security improvements.
Improvements
- Fixed dependency issues
- Added Python to dev container setup
- Security: Updated module golang.org/x/crypto to v0.45.0
- Updated dependency typing_extensions to v4.15.0
- Updated dependency sphinx-autodoc-typehints to v2.5.0
- Updated dependency myst-parser to v4.0.1
- Updated go.starlark.net digest to be02852
- Pinned dependencies for better stability
v0.1.1
v0.1.0
xk6-python v0.1.0 is here 🎉!
This is the initial release.
Status
xk6-python is currently in Proof of Concept status, but can already be used to run real k6 tests written in Python.
Check the documentation for available modules.
Usage
-
Download the archive for your operating system and extract the
k6executable from it: Windows, Mac, Linux -
Create a k6 test script in python (script.py). The following example can be a good starting point:
load("check", "check") load("requests", "get") load("time", "sleep") options = { "vus": 5, "duration": "5s", "thresholds": { "checks": ["rate>=0.99"], }, } def default(_): resp = get("https://httpbin.test.k6.io/get") check(resp, { "is status 200": lambda r: r.status_code == 200, }) sleep(0.5)
-
Run the script with the k6 executable extracted from the release:
./k6 run script.py
-
Read the documentation about the available APIs.