Skip to content

Commit

Permalink
add test.js
Browse files Browse the repository at this point in the history
Signed-off-by: ShutingZhao <[email protected]>
  • Loading branch information
realshuting committed Oct 25, 2023
1 parent ee3c2c9 commit 1345a63
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions k6/tests/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import http from 'k6/http';
import { sleep } from 'k6';

export const options = {
duration: '1m',
vus: 2,
thresholds: {
http_req_failed: ['rate<0.01'], // http errors should be less than 1%
http_req_duration: ['p(95)<10'], // 95 percent of response times must be below 500ms
},
};

export default function () {
const res = http.get('https://test.k6.io');
sleep(1);
}

0 comments on commit 1345a63

Please sign in to comment.