diff --git a/README.md b/README.md index 362cb81..949c1ad 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ 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. ```sh -k6 run -e HOSTNAME=192.168.1.1:5157 tests/simple-test.js +k6 run -e HOSTNAME=192.168.1.1:5157 tests/stress-test.js ``` ## Simple Test diff --git a/tests/load-test.js b/tests/load-test.js index 3d82da4..59aa94b 100644 --- a/tests/load-test.js +++ b/tests/load-test.js @@ -12,7 +12,7 @@ export const options = { { duration: '5m', target: 0 }, // ramp-down to 0 users ], thresholds: { - http_req_duration: ['p(99)<10'], // 99% of requests must complete within 10ms + http_req_duration: ['p(99)<100'], // 99% of requests must complete within 100ms } }; diff --git a/tests/simple-test.js b/tests/simple-test.js index 1256614..2f307c5 100644 --- a/tests/simple-test.js +++ b/tests/simple-test.js @@ -1,13 +1,10 @@ import http from 'k6/http'; -var hostname = __ENV.HOSTNAME; -if (hostname == null) hostname = 'localhost:5157'; - export const options = { vus: 1, - duration: '10s' + duration: '2s' }; export default () => { - http.get(`http://${hostname}/age/1987-09-01`); + http.get('http://localhost:5157/age/1990-01-01'); }; \ No newline at end of file