The code from my YouTube video on "How to do Performance Testing with k6"
Find a file
2023-09-27 09:21:41 +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 Add hostname to simple test 2023-09-26 11:54:16 +01:00
.gitignore Add API for calculating age 2023-09-26 11:11:28 +01:00
docker-compose.yml Add docker files 2023-09-27 09:21:41 +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 Add hostname to simple test 2023-09-26 11:54:16 +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:

cd src
dotnet run

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

I have added a HOSTNAME variable to each of the scripts which needs to be added when running them.

Simple Test

k6 run -e HOSTNAME=localhost:5157 tests/simple-test.js

Stress Test

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

Spike Test

k6 run -e HOSTNAME=localhost:5157 tests/spike-test.js

Load Test

k6 run -e HOSTNAME=localhost:5157 tests/load-test.js

Soak Test

k6 run -e HOSTNAME=localhost:5157 tests/soak-test.js