Load Testing K6 - noteman1/wiki GitHub Wiki
Load Testing K6 form mac os
install k6
$ brew install k6
make script.js
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
vus: 10,
duration: '30s',
};
export default function () {
const res = http.get('https://test.k6.io');
check(res, {
'status was 200': (r) => r.status == 200,
});
sleep(1);
}
Run k6
$ k6 run script.js