Nothing Special   »   [go: up one dir, main page]

Skip to content

lynix28/loadtest-k6-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loadtest-k6-example

CircleCI

Performance testing script example using Grafana K6


Script example:

  • 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 in support-files, use Docker / NodeJS.

How to run in local:

  • 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

Test report:

image

K6 + Shoutrrr:

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

image

About

API Load testing example using K6 by Grafana Labs

Topics

Resources

Stars

Watchers

Forks