The code from my YouTube video on "How to do Performance Testing with k6"
.vscode | ||
src | ||
tests | ||
.gitignore | ||
LICENSE | ||
performance-testing.sln | ||
README.md |
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 (except simple-test.js) which needs to be added when running them.
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