Performance testing script example using Grafana K6
- Check in
script-example
directory - For the GRPC test example, you need to build and run a Dummy GRPC Server.
I provide the sample dummy server to run, check insupport-files
, use Docker / NodeJS.
- Running the single script:
k6 run .script-example/http-loadtest-constant-rate.js
- Running the modular script:
k6 run ./test.js -c ./config.json
- Add these arguments if you wish to save the test logs and results as a JSON.
--log-output file=reports/k6.log --log-format json --summary-export reports/report.json
Do u want to run the test with notification but u do not have K6 Cloud membership ?
U can use 'Shoutrrr', but need some setup to make it work, for example u can check my Dockerfile
and run.sh
(sorry the shell-script it quite mess).
After u done with the setup, u can run it by this command
./run.sh pipeline test.js discord $DISCORD_TOKEN $DISCORD_WEBHOOKID
(remember to give the 'run.sh' an execute permission)
Once u do it correctly, It will show like this