This file contains 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, group, sleep } from "k6"; | |
import { Counter, Rate, Trend } from "k6/metrics"; | |
import { randomSeed } from 'k6'; | |
const loginData = JSON.parse(open("./users.json")); // download the data file here: https://test.k6.io/static/examples/users.json | |
/* Options | |
Global options for your script | |
stages - Ramping pattern | |
thresholds - pass/fail criteria for the test |
This file contains 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
/* | |
A simple script meant to be used with `k6 run` when doing a product walkthrough. | |
Handy for showing how debugging works from the command line. | |
e.g. `k6 run simpleDemo.js -i 1 -u1 --http-debug` | |
*/ | |
import http from "k6/http"; | |
import { sleep, check } from "k6"; | |
import { Counter } from "k6/metrics"; |
This file contains 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 { sleep, check } from "k6"; | |
import { Counter } from "k6/metrics"; | |
export let options = { | |
stages: [ | |
{ target: 10, duration: "30s" }, | |
{ target: 20, duration: "30s" }, | |
{ target: 0, duration: "30s" } |
This file contains 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
// Creator: k6 Browser Recorder 0.6.2 | |
import { sleep, group } from "k6"; | |
import http from "k6/http"; | |
import { FormData } from "https://jslib.k6.io/formdata/0.0.1/index.js"; | |
export const options = {}; | |
export default function main() { |
This file contains 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'; | |
export let options = { | |
vus: 5, | |
duration: "5s", | |
ext: { | |
loadimpact: { | |
projectID: 3537921, //3481255 | |
name: "expected status", | |
distribution: { |
This file contains 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, group, sleep } from "k6"; | |
import { Counter, Rate, Trend } from "k6/metrics"; | |
import { randomIntBetween, randomItem } from "https://jslib.k6.io/k6-utils/1.0.0/index.js"; | |
const loginData= JSON.parse(open("./users.json")); // download the data file here: https://test.k6.io/static/examples/users.json | |
/* Options | |
Global options for your script | |
stages - Ramping pattern |
This file contains 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
// Creator: k6 Browser Recorder 0.6.1 | |
import { sleep, group } from "k6"; | |
import http from "k6/http"; | |
import { | |
randomIntBetween, | |
randomItem, | |
} from "https://jslib.k6.io/k6-utils/1.0.0/index.js"; | |
export const options = { vus: 10, duration: "5m" }; |
This file contains 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
// Creator: k6 Browser Recorder 0.6.1 | |
import { sleep, group } from "k6"; | |
import http from "k6/http"; | |
import { randomIntBetween, randomItem } from "https://jslib.k6.io/k6-utils/1.0.0/index.js"; | |
export const options = { vus: 10, duration: "5m" }; | |
export default function main() { | |
let response; |
This file contains 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, group, sleep } from "k6"; | |
import { Counter, Rate, Trend } from "k6/metrics"; | |
const loginData = JSON.parse(open("./users.json")); // download the data file here: https://test.k6.io/static/examples/users.json | |
/* Options | |
Global options for your script | |
stages - Ramping pattern | |
thresholds - pass/fail criteria for the test | |
ext - Options used by Load Impact cloud service test name and distribution | |
*/ |
This file contains 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
{ | |
"users": [ | |
{ "username": "admin", "password": "123" }, | |
{ "username": "test", "password": "1234" }, | |
{ "username": "invaliduser", "password": "password"} | |
] | |
} |
NewerOlder