The code from my YouTube video on "How to do Performance Testing with k6"
Find a file
2023-09-28 10:02:15 +01:00
.vscode Add API for calculating age 2023-09-26 11:11:28 +01:00
src Add k6 test files 2023-09-26 11:52:17 +01:00
tests Simple test to 10s 2023-09-28 10:02:15 +01:00
.gitignore Add API for calculating age 2023-09-26 11:11:28 +01:00
docker-compose.yml Downgrade compose file to work on pi 2023-09-27 10:24:17 +01:00
Dockerfile Add docker files 2023-09-27 09:21:41 +01:00
LICENSE Initial commit 2023-09-26 10:02:57 +01:00
performance-testing.sln Add API for calculating age 2023-09-26 11:11:28 +01:00
README.md Update tests 2023-09-27 12:22:11 +01:00

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