performance-testing/README.md
2023-09-27 12:22:11 +01:00

776 B

performance-testing

The code from my YouTube video on "How to do Performance Testing with k6"

You first need to run the API which you can do in 2 ways.

Using dotnet:

cd src
dotnet run

Using Docker:

docker-compose up

Then in a seperate terminal window run the tests using the commands below.

Note if you want to run these scripts against an API hosted on another machine you can use the HOSTNAME environment variable. e.g.

k6 run -e HOSTNAME=192.168.1.1:5157 tests/stress-test.js

Simple Test

k6 run tests/simple-test.js

Stress Test

k6 run tests/stress-test.js

Load Test

k6 run tests/load-test.js

Spike Test

k6 run tests/spike-test.js

Soak Test

k6 run tests/soak-test.js