-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
42 lines (36 loc) · 1.06 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
stages: [
{ duration: '5s', target: 5 },
{ duration: '30s', target: 5 },
{ duration: '5s', target: 20 },
{ duration: '30s', target: 20 },
{ duration: '5s', target: 100 },
{ duration: '30s', target: 100 },
{ duration: '5s', target: 200 },
{ duration: '30s', target: 200 },
{ duration: '5s', target: 0 },
],
thresholds: {
http_req_duration: ['p(95)<600'],
},
};
// export default function () {
// http.get('http://localhost:5273/Email');
// sleep(1);
// }
export default function () {
const url = 'http://localhost:5273/Email/AddEmail';
const payload = JSON.stringify({
receiverEmail: '[email protected]',
message: 'test message 1',
deliveryDate : "2023-02-21T14:05:40.445Z",
});
const params = {
headers: {
'Content-Type': 'application/json',
},
};
http.post(url, payload, params);
}