Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kwidera/k6_framework
framework for k6 tool
https://github.com/kwidera/k6_framework
Last synced: about 1 month ago
JSON representation
framework for k6 tool
- Host: GitHub
- URL: https://github.com/kwidera/k6_framework
- Owner: kwidera
- Created: 2023-12-13T16:54:56.000Z (almost 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-22T12:52:59.000Z (7 months ago)
- Last Synced: 2024-08-03T02:06:13.913Z (4 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-k6 - kwidera/k6_framework - Another k6 framework example. (Examples/Templates)
- awesome-k6 - kwidera/k6_framework - Another k6 framework example. (Examples/Templates)
README
# k6_framework
Framework for k6 toolBefore first run build with:
xk6 build v0.45.1 --with github.com/grafana/[email protected]To run example:
./k6 run main.js -e CONFIG_FILES='./configs/exampleConfig.json' -e URL='https://test-api.k6.io'To run your own test:
1. create script in scripts folder
2. export it in scripts/index.js file
3. pick or create a scenario from options/scenarios.js
4. pick or create thresholds from options/thresholds.js
5. create config file in configs folderConfig file description:
1. Config may contain more than 1 test:
[
{
TEST_1
},
{
TEST_2
}
]
2. Each test schould contain:
- scriptName (name of the script from scripts/index.js file)
- scenarioName (name of the sceanrio from options/scenarios.js file)
- thresholds (name of the thresholds from options/thresholds.js file)
- data (data you need to prepare for the test - see getData() method from objects/data.js file)You can run several config files with:
CONFIG_FILES='./configs/exampleConfig.json,./configs/anotherExample.json'
(relative path to the files, comma delimited)If you provide no value for CONFIG_FILES all configs from configs folder will be executed.
For more information what this framework has to offer and what is the approach explore it on your own. First, by running the example with ./k6 run main.js -e CONFIG_FILES='./configs/exampleConfig.json' -e URL='https://test-api.k6.io'. Enjoy! :D