Add hostname to simple test

This commit is contained in:
Alex Hyett 2023-09-26 11:54:16 +01:00
parent 90651ed6aa
commit 1b8787547e
2 changed files with 7 additions and 2 deletions

View file

@ -9,7 +9,12 @@ dotnet run
Then in a seperate terminal window run the tests using the commands below. 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. 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
```
## Stress Test ## Stress Test
```sh ```sh

View file

@ -6,5 +6,5 @@ export const options = {
}; };
export default () => { export default () => {
http.get('http://localhost:5157/age/1987-09-01'); http.get(`http://${__ENV.HOSTNAME}/age/1987-09-01`);
}; };