Created
August 31, 2020 01:36
-
-
Save luketn/3f191cffb7f815074d7e99cf848a02e0 to your computer and use it in GitHub Desktop.
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 http from 'k6/http'; | |
import { check } from "k6"; | |
export let options = { | |
stages: [ | |
// Ramp-up from 1 to 5 VUs in 5s | |
{ duration: "5s", target: 5 }, | |
// Stay at rest on 5 VUs for 10s | |
{ duration: "10s", target: 5 }, | |
// Ramp-down from 5 to 0 VUs for 5s | |
{ duration: "5s", target: 0 } | |
] | |
}; | |
export default function () { | |
const response = http.get("https://swapi.dev/api/people/30/", {headers: {Accepts: "application/json"}}); | |
check(response, { "status is 200": (r) => r.status === 200 }); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment