Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caiquecoelho/k6
https://github.com/caiquecoelho/k6
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/caiquecoelho/k6
- Owner: CaiqueCoelho
- Created: 2024-01-26T20:58:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-20T19:15:04.000Z (5 months ago)
- Last Synced: 2024-11-16T20:13:08.368Z (2 months ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Hot to run
```
k6 run test.js
k6 run --vus 10 --duration 30s test.js
k6 run --vus 100 --duration 30s thresholds.js
k6 run --config options.json script.js
```### Hot to run for X k6 - Browser
```
export K6_BROWSER_ENABLEd = true
k6 run xk6.js
```k6 run --http-debug scenarios.js
k6 run --http-debug="full" scenarios.js
k6 run -e BASE_URL="https://test-api.k6.io" --http-debug="full" best-practices.js### Login locally with K6 Cloud
k6 login cloud --token
you can get the token in
https://caiquedpfc.grafana.net/a/k6-app/settings/api-token### Cloud execution
k6 cloud test.js
### Local execution with stream result to cloud
k6 run --out cloud test.js
### Defining VUs and duration in CLI
k6 run --vus 2 --duration 10s test.js
For 1 iteration:
k6 run --vus 10 --duration 30s --iterations 1 test.jsOr
k6 run --u 10 --d 30s --i 10 test.js### Skip SSL verification
k6 run --insecure-skip-tls-verify test.js
### Exporting k6 result to json
k6 run test.js --summary-export=summary.json
k6 run test.js --out json=full_result.json### Exit code
Passing with success exit code 0
Failing with exit non-zero code, like 1 or 99### Run k6 in cloud from jenkins
k6 cloud script.js --token
Or just make sure you have a global env secret called K6_CLOUD_TOKEN with the value of your K6 Cloud token from Grafana Stack Token
And make sure you have the project id in the file or as env variable exported
export K6_CLOUD_PROJECT_ID=