Created
November 15, 2019 11:44
-
-
Save davidmukiibi/cad43503e9c8e9689db18ca14341b89b to your computer and use it in GitHub Desktop.
k6 performance test script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { check, sleep } from "k6"; | |
import http from "k6/http"; | |
export let options = { | |
stages: [ | |
{ duration: "60s", target: 10 }, | |
{ duration: "60s", target: 0 } | |
], | |
thresholds: { | |
http_req_duration: ["p(95)<500"] | |
} | |
}; | |
export default function() { | |
let res = http.get("https://test.loadimpact.com/"); | |
check(res, { | |
"is status 200": (r) => r.status === 200 | |
}); | |
sleep(10); | |
; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment