performance-testing/README.md

37 lines
726 B
Markdown
Raw Normal View History

2023-09-26 09:02:57 +00:00
# performance-testing
2023-09-26 10:52:17 +00:00
The code from my YouTube video on "How to do Performance Testing with k6"
You first need to run the API:
```sh
cd src
dotnet run
```
Then in a seperate terminal window run the tests using the commands below.
2023-09-26 10:54:16 +00:00
I have added a HOSTNAME variable to each of the scripts which needs to be added when running them.
## Simple Test
```sh
k6 run -e HOSTNAME=localhost:5157 tests/simple-test.js
```
2023-09-26 10:52:17 +00:00
## Stress Test
```sh
k6 run -e HOSTNAME=localhost:5157 tests/stress-test.js
```
## Spike Test
```sh
k6 run -e HOSTNAME=localhost:5157 tests/spike-test.js
```
## Load Test
```sh
k6 run -e HOSTNAME=localhost:5157 tests/load-test.js
```
## Soak Test
```sh
k6 run -e HOSTNAME=localhost:5157 tests/soak-test.js
```