import http from 'k6/http';
import { sleep, check } from 'k6';
export default function () {
const body = { //담길json };
const params = { headers: {'Content-Type': 'application/json'} };
const res = http.post('<http://localhost:8080/api/v1/login>', JSON.stringify(body), params);
check(res, {
'response code was 200': (res) => res.status === 200,
});
sleep(0);
}
k6 run --vus 10 --duration 30s --out json=out.json script.js