-
Notifications
You must be signed in to change notification settings - Fork 0
/
k6.js
30 lines (28 loc) · 963 Bytes
/
k6.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
import http from "k6/http";
import { sleep, check } from "k6";
export const options = {
stages: [
{ target: 5000, duration: "1m" },
// { target: 5000, duration: '10m' },
],
};
export default function () {
const data = {
metadata: {
spamhammer: "1|14",
},
contents: {
subject: "Important information about your account.",
from: "[email protected]",
to: "[email protected]",
body: "Dear customer,\nWe have noticed some suspicious activity on your account. Please click [here](https://scam-check.uq.edu.au?userId=uqehugh3) to reset your password. and https://scam-check.uq.edu.au?userId=uqehugh3",
},
};
const res = http.post(
"http://spamoverflow-1430562822.us-east-1.elb.amazonaws.com:8080/api/v1/customers/111100005412/emails",
JSON.stringify(data),
{ headers: { "Content-Type": "application/json" } }
);
check(res, { "status was 201": (r) => r.status == 201 });
sleep(1);
}