We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2366e76 commit 28f3bd1Copy full SHA for 28f3bd1
Performance Test/health-test.js
@@ -0,0 +1,22 @@
1
+import http from 'k6/http';
2
+import { check, sleep } from 'k6';
3
+
4
+const baseUrl = __ENV.K6_TEST_URL;
5
+const targetUrl = `${baseUrl.replace(/\/$/, '')}/health-check`;
6
7
+console.log(`[k6] 테스트 시작!!. Target URL: ${targetUrl}`);
8
9
+export const options = {
10
+ thresholds: {
11
+ http_req_duration: ['p(95)<300'],
12
+ http_req_failed: ['rate<0.01'],
13
+ },
14
+};
15
16
+export default function () {
17
+ const res = http.get(targetUrl, { tags: { endpoint: 'health' } });
18
+ check(res, {
19
+ 'status is 200': (r) => r.status === 200,
20
+ });
21
+ sleep(1);
22
+}
0 commit comments