Skip to content

Instantly share code, notes, and snippets.

@andrelashley
Created March 9, 2021 23:12
Show Gist options
  • Save andrelashley/b772421109610f4cbda9a22cf6768b8a to your computer and use it in GitHub Desktop.
Save andrelashley/b772421109610f4cbda9a22cf6768b8a to your computer and use it in GitHub Desktop.
import http from 'k6/http';
import { check, sleep } from 'k6';
export let options = {
stages: [
{ duration: '30s', target: 500 },
{ duration: '15s', target: 500 },
{ duration: '30s', target: 0 },
],
};
export default function() {
let res1 = http.get("https://dev.news.gov.bc.ca");
check(res1, {'status was 200': r => r.status == 200});
// sleep(5);
//let res2 = http.get("https://dev.news.gov.bc.ca/releases/2021TACS0001-000008");
// check(res2, {'status was 200': r => r.status == 200});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment