k6-cucumber-steps 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env node
2
+
3
+ const path = require("path");
4
+ const { spawn } = require("child_process");
5
+ require("dotenv").config();
6
+
7
+ // Use yargs for better argument parsing
8
+ const argv = require("yargs")
9
+ .usage("Usage: $0 run --feature <path> [options]")
10
+ .option("feature", {
11
+ alias: "f",
12
+ describe: "Path to the feature file",
13
+ type: "string",
14
+ demandOption: true,
15
+ })
16
+ .option("tags", {
17
+ alias: "t",
18
+ describe:
19
+ "Cucumber tags to filter scenarios (e.g., '@smoke and not @integration')",
20
+ type: "string",
21
+ })
22
+ .option("reporter", {
23
+ alias: "r",
24
+ describe: "Generate HTML and JSON reports in the reports directory",
25
+ type: "boolean",
26
+ default: false,
27
+ })
28
+ .help().argv;
29
+
30
+ const featureFilePath = path.resolve(process.cwd(), argv.feature);
31
+ const cucumberCommand = "cucumber-js";
32
+ const cucumberArgs = [
33
+ featureFilePath,
34
+ "--require-module",
35
+ "@babel/register",
36
+ "--require",
37
+ path.resolve(__dirname, "../step-definitions"),
38
+ "--format",
39
+ "summary",
40
+ ];
41
+
42
+ if (argv.tags) {
43
+ cucumberArgs.push("--tags", argv.tags);
44
+ }
45
+
46
+ if (argv.reporter) {
47
+ const reportsDir = path.resolve(process.cwd(), "reports");
48
+ // Ensure reports directory will be created by cucumber-js if needed
49
+ cucumberArgs.push("--format", `json:${reportsDir}/load-results.json`);
50
+ cucumberArgs.push("--format", `html:${reportsDir}/load-results.html`);
51
+ }
52
+
53
+ async function main() {
54
+ console.log(
55
+ `Running Cucumber using command: ${cucumberCommand} ${cucumberArgs.join(
56
+ " "
57
+ )}`
58
+ );
59
+
60
+ const cucumberProcess = spawn(cucumberCommand, cucumberArgs, {
61
+ cwd: process.cwd(),
62
+ stdio: "inherit", // Forward stdout and stderr to the console
63
+ });
64
+
65
+ cucumberProcess.on("close", (code) => {
66
+ if (code !== 0) {
67
+ console.error(`Cucumber process exited with code ${code}`);
68
+ process.exit(code);
69
+ } else {
70
+ console.log(
71
+ "Cucumber tests finished successfully. Check k6 output for performance results (if any steps ran k6)."
72
+ );
73
+ }
74
+ });
75
+ }
76
+
77
+ main().catch((err) => {
78
+ console.error("An unexpected error occurred:", err.message);
79
+ process.exit(1);
80
+ });
81
+
82
+ // No need to import the @cucumber/cucumber API directly anymore
@@ -28,7 +28,7 @@
28
28
 
29
29
  module.exports = function buildK6Script(config) {
30
30
  const { method, endpoints, endpoint, body, headers, options } = config;
31
-
31
+ console.log("Generating k6 script with config:", config);
32
32
  // Ensure at least one of `endpoints` or `endpoint` is defined
33
33
  if (!endpoints?.length && !endpoint) {
34
34
  throw new Error(
@@ -14,7 +14,8 @@ const faker = require("@faker-js/faker");
14
14
 
15
15
  module.exports = function resolveBody(template, env) {
16
16
  let result = template;
17
-
17
+ console.log("Resolving body template:", template);
18
+ console.log("Resolved body result:", result);
18
19
  // Replace env vars like {{username}}
19
20
  result = result.replace(/{{(\w+)}}/g, (_, key) => {
20
21
  if (!(key in env)) {
@@ -28,8 +29,10 @@ module.exports = function resolveBody(template, env) {
28
29
  const parts = methodPath.split(".");
29
30
  let fn = faker;
30
31
  for (const part of parts) {
31
- fn = fn[part];
32
- if (!fn) break;
32
+ fn = fn?.[part]; // Use optional chaining to avoid errors
33
+ if (!fn) {
34
+ throw new Error(`Invalid Faker template: {{faker.${methodPath}}}`);
35
+ }
33
36
  }
34
37
  if (typeof fn !== "function") {
35
38
  throw new Error(`Invalid Faker template: {{faker.${methodPath}}}`);
@@ -43,7 +46,11 @@ module.exports = function resolveBody(template, env) {
43
46
  if (!fs.existsSync(filePath)) {
44
47
  throw new Error(`Payload file not found: ${fileName}`);
45
48
  }
46
- return JSON.stringify(JSON.parse(fs.readFileSync(filePath, "utf-8")));
49
+ try {
50
+ return JSON.stringify(JSON.parse(fs.readFileSync(filePath, "utf-8")));
51
+ } catch (error) {
52
+ throw new Error(`Failed to parse JSON file: ${fileName}`);
53
+ }
47
54
  });
48
55
 
49
56
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k6-cucumber-steps",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,6 +25,9 @@
25
25
  "step_definitions/**/*.js"
26
26
  ]
27
27
  },
28
+ "bin": {
29
+ "k6-cucumber-steps": "./bin/k6-cucumber-runner.js"
30
+ },
28
31
  "keywords": [
29
32
  "k6",
30
33
  "cucumber",
@@ -56,5 +59,9 @@
56
59
  "form-data": "^4.0.2",
57
60
  "k6": "^0.0.0",
58
61
  "tsconfig-paths": "^4.2.0"
62
+ },
63
+ "dependencies": {
64
+ "@babel/register": "^7.25.9",
65
+ "yargs": "^17.7.2"
59
66
  }
60
67
  }
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Cucumber</title>
5
+ <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22ml-3%20ml-md-0%22%20viewBox%3D%220%200%2040.59%2046.31%22%20width%3D%2240.59%22%20height%3D%2246.31%22%3E%0A%20%20%20%20%3Cg%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%2323d96c%22%20fill-rule%3D%22evenodd%22%20d%3D%22M30.283%203.645q-.528-.317-1.08-.593a16.164%2016.164%200%2000-1.154-.518c-.124-.052-.247-.1-.372-.149-.343-.127-.689-.268-1.042-.371a19.427%2019.427%200%2010-9.792%2037.51v5.56c11.676-1.753%2022.016-10.979%2022.787-23.093.459-7.289-3.193-14.73-9.347-18.346z%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23173647%22%20d%3D%22M15.787%2046.307v-5.935A20.472%2020.472%200%201126.959%201.015c.274.08.557.187.832.291l.248.093c.165.064.291.113.417.167.348.137.739.313%201.208.543q.589.295%201.153.633c6.393%203.756%2010.354%2011.518%209.857%2019.316-.763%2012-10.722%2022.122-23.679%2024.067zm4.8-44.214h-.026a18.366%2018.366%200%2000-3.524%2036.408l.85.165v5.18c11.392-2.224%2020.009-11.272%2020.686-21.922.448-7.033-3.1-14.018-8.83-17.383l-.008-.005A14.691%2014.691%200%200027.654%203.5a5.74%205.74%200%2000-.344-.138l-.27-.1a9.49%209.49%200%2000-.708-.249%2018.425%2018.425%200%2000-5.743-.92z%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20fill%3D%22%23173647%22%20fill-rule%3D%22evenodd%22%20d%3D%22M16.666%2010.58a1.8%201.8%200%20011.583.608%204.184%204.184%200%2001.728%201.107c.645%201.422%201.027%203.461.23%204.605a6.334%206.334%200%2001-3.981-3.087%203.236%203.236%200%2001-.347-1.339%201.957%201.957%200%20011.787-1.894zm-5.683%208.025a7.742%207.742%200%20001.218.737%205.789%205.789%200%20004.883-.138%206.116%206.116%200%2000-3.345-3.45%203.664%203.664%200%2000-1.442-.321%201.884%201.884%200%2000-.319%200%201.766%201.766%200%2000-.995%203.172zm6.1%203.433c-.777-.518-2.379-.309-3.312-.292a4.416%204.416%200%2000-1.666.352%203.5%203.5%200%2000-1.218.738%201.817%201.817%200%20001.409%203.171%203.3%203.3%200%20001.442-.321c1.436-.62%203.141-2.32%203.346-3.648zm2.61%202a6.556%206.556%200%2000-3.724%203.506%203.091%203.091%200%2000-.321%201.314%201.907%201.907%200%20003.3%201.346%207.422%207.422%200%2000.7-1.218c.621-1.333.866-3.72.046-4.948zm2.557-7.167a5.941%205.941%200%20003.7-3.167%203.243%203.243%200%2000.319-1.346%201.915%201.915%200%2000-1.794-1.954%201.832%201.832%200%2000-1.6.641%207.382%207.382%200%2000-.705%201.218c-.62%201.434-.842%203.48.081%204.603zm4.208%2012.115a3.244%203.244%200%2000-.321-1.345%205.869%205.869%200%2000-3.554-3.269%205.386%205.386%200%2000-.226%204.711%204.147%204.147%200%2000.7%201.121c1.133%201.23%203.505.32%203.402-1.218zm4.2-6.28a7.466%207.466%200%2000-1.217-.7%204.425%204.425%200%2000-1.666-.352%206.4%206.4%200%2000-3.188.555%205.959%205.959%200%20003.316%203.386%203.672%203.672%200%20001.442.32%201.8%201.8%200%20001.31-3.209z%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E">
8
+ <style>
9
+ body{padding:0;margin:0}.html-formatter{max-width:1600px;min-height:100vh;margin:0 auto}
10
+ .XR3QM0DC8dUJX1FPQBu_{background-color:var(--cucumber-panel-accent-color, #e8e8e8);border:1px solid rgba(0,0,0,0)}.jjG3rnQfHnX9wBgX_idP{display:grid;grid-template-columns:repeat(12, 1fr);grid-template-rows:1fr 1fr;gap:1px;margin:0;text-align:center}.rfv832DGvJuGyzFuMjXC{grid-column-end:span 4;display:flex;flex-direction:column-reverse;justify-content:center;padding:1.5em;background-color:var(--cucumber-background-color, white);color:var(--cucumber-text-color, #222)}.ZObJrdGWGYZYqvRPTO7x,.ZObJrdGWGYZYqvRPTO7x~.rfv832DGvJuGyzFuMjXC{grid-column-end:span 3}.OFz0nWrlbIgqinwc4usO{font-weight:bold;font-size:1.25em;margin:0}.OFz0nWrlbIgqinwc4usO svg{max-width:2em}.xmSDOQ_c8MimWxT035vV{font-size:1em;margin-top:.25em;color:var(--cucumber-code-text-color, #666)}.PUJ_q_3Y8RQhAcXxakiL{display:inline-flex;gap:.25em}.PUJ_q_3Y8RQhAcXxakiL+.PUJ_q_3Y8RQhAcXxakiL{margin-left:1em}.PUJ_q_3Y8RQhAcXxakiL a{color:var(--cucumber-anchor-color, #297bde)}
11
+ .E4mSCqTkr4getx0W9smB{margin-bottom:1.5em}.E4mSCqTkr4getx0W9smB>*{border-top:0 !important}
12
+ .gUbOxW8Yux5FNeSfsI2O{position:relative;display:flex;align-items:center}.AEvAM9M_0ZxmJghPdVQs{color:var(--cucumber-anchor-color, #297bde);opacity:0;transition:all .35s ease-in-out;position:absolute;font-size:.75em;left:var(--cucumber-anchor-offset, -1.1em)}.gUbOxW8Yux5FNeSfsI2O:hover .AEvAM9M_0ZxmJghPdVQs{opacity:1}
13
+ .gXG0xG1TJk_4pdoSxoAf{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:.875em;padding:.666em .75em;border-radius:.25em;margin:0;overflow-x:auto;background-color:var(--cucumber-error-background-color, #fff0f0);color:var(--cucumber-error-text-color, #bd0a2b)}
14
+ .J2h_F2WM3WVOOjWSISvA{position:relative;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:.875em;padding:.666em .75em;border-radius:.25em;margin:0;overflow-x:auto;background-color:var(--cucumber-code-background-color, #f6f8fa);color:var(--cucumber-code-text-color, #666)}.Csls2DZsTVl5_RDKgLID{padding-left:3.25em}.Csls2DZsTVl5_RDKgLID::before{content:"Log";position:absolute;top:.666em;left:.75em;text-transform:uppercase;font-weight:bold;color:var(--cucumber-parameter-color, #297bde);opacity:.75}.BL_UrJNG5vfwcNU6hhPj{margin-right:.75em;opacity:.333}.zKWxtTmik48Yw6hm6NJT{max-width:100%;margin-top:.5em}.Kwg8ACzZ14UJrwu6pQDG{list-style:none;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0}.Kwg8ACzZ14UJrwu6pQDG a{text-decoration:none;color:var(--cucumber-anchor-color, #297bde)}.Kwg8ACzZ14UJrwu6pQDG svg{margin-right:.5em}
15
+ .pzfx7tCRXyytC6g9SDxg{display:flex;align-items:center;gap:4px;background-color:rgba(0,0,0,0);color:var(--cucumber-anchor-color, #297bde);font-family:inherit;font-size:inherit;padding:0;border:0;margin:0 0 .5em 0;cursor:pointer}.pzfx7tCRXyytC6g9SDxg:hover,.pzfx7tCRXyytC6g9SDxg:focus{text-decoration:underline}
16
+ .IWgpmOz8r6Wj2YWzioT1{padding:0;margin:1em}.IWgpmOz8r6Wj2YWzioT1 a{color:var(--cucumber-anchor-color, #297bde)}
17
+ .MNkrrVMCDeB7mTXs5do4{border-collapse:collapse;margin:0}.MNkrrVMCDeB7mTXs5do4 thead tr{border-bottom:6px solid rgba(0,0,0,0)}.MNkrrVMCDeB7mTXs5do4 tr+tr{border-top:6px solid rgba(0,0,0,0)}.MNkrrVMCDeB7mTXs5do4 th,.MNkrrVMCDeB7mTXs5do4 td{padding:.4em .6em;border-width:2px;border-style:solid;border-top:none;border-bottom:none;border-color:var(--cucumber-keyword-color, #000080);color:var(--cucumber-parameter-color, #297bde)}
18
+ .buWCECLHpnDfpwKwugOX{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:var(--cucumber-docstring-color, #008080);padding-bottom:.25em;margin:0;overflow-x:auto}.buWCECLHpnDfpwKwugOX::before,.buWCECLHpnDfpwKwugOX::after{content:'"""';display:block;transform:translateY(0.25em)}.buWCECLHpnDfpwKwugOX::before{padding-bottom:.25em}.buWCECLHpnDfpwKwugOX::after{padding-top:.25em}
19
+ .KqWCaxcpp4sxz7A20RLA{font-weight:bold;color:var(--cucumber-keyword-color, #000080);margin-right:.5em}
20
+ .jraSbOu3Xpk7mbUgodqc{font-weight:normal;color:var(--cucumber-parameter-color, #297bde)}
21
+ .j0ln79cSlRB4hNiHeXjH[data-status=PASSED]{color:rgba(44,177,74,.667)}.j0ln79cSlRB4hNiHeXjH[data-status=SKIPPED]{color:rgba(0,160,204,.667)}.j0ln79cSlRB4hNiHeXjH[data-status=PENDING]{color:rgba(255,173,51,.667)}.j0ln79cSlRB4hNiHeXjH[data-status=UNDEFINED]{color:rgba(255,173,51,.667)}.j0ln79cSlRB4hNiHeXjH[data-status=AMBIGUOUS]{color:rgba(244,235,253,.667)}.j0ln79cSlRB4hNiHeXjH[data-status=FAILED]{color:rgba(187,0,0,.667)}.j0ln79cSlRB4hNiHeXjH[data-status=UNKNOWN]{color:rgba(182,190,203,.667)}
22
+ .UXBAOOwgLjqbpb8XD1WL{display:flex;--cucumber-anchor-offset: -3.25em}.kDEmgsysGXM7DgTGCWfs{width:1.5em;padding-top:.1em}.rIuf66pcn5inse3YjseZ{flex-grow:1;max-width:calc(100% - 1.5em)}.rIuf66pcn5inse3YjseZ>*+*{margin-top:.25em !important}
23
+ .vf7CPB8kAcns60tKI7vY{display:inline-block;font-weight:normal;padding:0;margin:0}
24
+ .bbjk27OORIAhv9IbGaBL{padding:0;margin:1em}.bbjk27OORIAhv9IbGaBL>li{list-style:none}.bbjk27OORIAhv9IbGaBL>li+li{margin-top:.25em}
25
+ .vIGVFeZhSpvtjMv28qFg{padding:0;margin:1em}
26
+ .R_7odAGRh9ZWASbUwK3j{margin-left:1rem}
27
+ .Fdmm0s4soB2pkvNYXQbv{border-collapse:collapse;margin:0}.Fdmm0s4soB2pkvNYXQbv thead tr{border-bottom:6px solid rgba(0,0,0,0)}.Fdmm0s4soB2pkvNYXQbv tr+tr{border-top:6px solid rgba(0,0,0,0)}.Fdmm0s4soB2pkvNYXQbv th,.Fdmm0s4soB2pkvNYXQbv td{padding:.4em .6em;border-width:2px;border-style:solid;border-top:none;border-bottom:none;border-color:var(--cucumber-keyword-color, #000080);color:var(--cucumber-parameter-color, #297bde)}.Fdmm0s4soB2pkvNYXQbv th:first-child,.Fdmm0s4soB2pkvNYXQbv td:first-child{border-left:none}.Fdmm0s4soB2pkvNYXQbv tbody tr{cursor:pointer}
28
+ .FbgC7RSK7PrGGsNDRAl2{padding:0;margin:0}.QRN0XyDjb8RR6B4I3C5w{display:inline;list-style-type:none;padding:8px 0;color:var(--cucumber-tag-color, #808000)}.QRN0XyDjb8RR6B4I3C5w:not(:last-child){margin-right:10px}
29
+ .ETQctlyGyWWjcMYVPHxW{transform:rotate(45deg)}
30
+ .X9zF5mRApmhkNHKRv89A{padding:0;margin:1em}.X9zF5mRApmhkNHKRv89A>li{list-style:none}.X9zF5mRApmhkNHKRv89A>li+li{margin-top:.25em}
31
+ .aNBioFoTxXGy8fl89aVN{padding-top:.35em;padding-left:.5em;padding-right:.5em}.uH0tV61h4vEwGIdnLhmB{border:1px solid var(--cucumber-panel-accent-color, #e8e8e8);border-radius:2px}.tIbY7PZ2bzsj9dKjbfxb+.tIbY7PZ2bzsj9dKjbfxb{border-top:1px solid var(--cucumber-panel-accent-color, #e8e8e8)}.oxCzU1rC8VLhLfVMMrX2{box-sizing:border-box;width:100%;padding:.75em 1em;border:none;background-color:var(--cucumber-panel-background-color, #f4f4f4);color:var(--cucumber-panel-text-color, #444);cursor:pointer;text-align:left}.oxCzU1rC8VLhLfVMMrX2:hover{background-color:var(--cucumber-panel-accent-color, #e8e8e8)}.g2StHf8iOGfwMQe5f9rk{transform-origin:center center;transition:transform .2s linear}.oxCzU1rC8VLhLfVMMrX2[aria-expanded=true] .g2StHf8iOGfwMQe5f9rk,.oxCzU1rC8VLhLfVMMrX2[aria-selected=true] .g2StHf8iOGfwMQe5f9rk{transform:rotate(90deg)}.aSGVb3Tv5B8Nz24vToKW{padding:1.25em}
32
+ .rioeqbTEi_lL8FESsJqA{display:flex;flex-direction:column;align-items:center;gap:.5em;padding-bottom:1.5em;text-align:center}.xvCoYo7NPDqD900sFMjr{font-size:3em;opacity:.125}
33
+ .qCGgrwvVkkINDRfqpvsj{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;padding:1em;border:1px solid var(--cucumber-panel-accent-color, #e8e8e8);background-color:var(--cucumber-panel-background-color, #f4f4f4);color:var(--cucumber-panel-text-color, #444)}.bnRegjcAB_MU3kCnU0eO{position:relative;margin-top:-0.5em}.DnlYJBmP1_AfFSU3KSgD{position:absolute;left:0;margin-left:.4em;top:.5em;opacity:.666}.XhufRLVTP4kJj55pWlZQ{box-sizing:border-box;width:100%;padding:.5em 0 .5em 1.5em;font-family:inherit;font-size:inherit;background-color:rgba(0,0,0,0);color:var(--cucumber-text-color, #222);border:1px solid #ced4da;border-radius:.3em}.Pj6CVtDA4EslW8OfcTI9{display:block;font-size:.75em;line-height:1em;margin-top:.3em}.Pj6CVtDA4EslW8OfcTI9 a{color:var(--cucumber-anchor-color, #297bde)}.JPICQf5NjLq2IqfrDM06{display:flex;align-items:center;gap:.5em}.i7Lu8mj6UiHXs3uZahvK{display:flex;align-items:center;gap:.5em;list-style:none;padding:0;margin:0}.di7wOxuS_2Y1X70JnH4C{opacity:.666}.ue2HaGqIjpPqXt_Q__wa{display:flex;align-items:center;gap:1px;accent-color:var(--cucumber-anchor-color, #297bde)}
34
+ .jGf5f1r0vW6ApPrFIznv{list-style:none;display:flex;width:100%;padding:0;margin:0}.VlpRuYBlXtcShawgxgzA{box-sizing:border-box;flex-grow:1;min-width:11em;padding:.333em 2.5em;background-color:#000;color:#fff;white-space:nowrap;text-align:center;text-transform:uppercase}.VlpRuYBlXtcShawgxgzA[data-status=PASSED]{background-color:#2cb14a}.VlpRuYBlXtcShawgxgzA[data-status=SKIPPED]{background-color:#00a0cc}.VlpRuYBlXtcShawgxgzA[data-status=PENDING]{background-color:#ffad33}.VlpRuYBlXtcShawgxgzA[data-status=UNDEFINED]{background-color:#ffad33}.VlpRuYBlXtcShawgxgzA[data-status=AMBIGUOUS]{background-color:#f4ebfd}.VlpRuYBlXtcShawgxgzA[data-status=FAILED]{background-color:#b00}.VlpRuYBlXtcShawgxgzA[data-status=UNKNOWN]{background-color:#b6becb}
35
+ .g84sy6xgJUyJIzpsyG5S{font-size:14px;font-family:"Inter var",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";color:var(--cucumber-text-color, #222);background:var(--cucumber-background-color, white)}.S07ZPK5i38Whpt0ARQ6p{--cucumber-background-color: #1d1d26;--cucumber-text-color: #c9c9d1;--cucumber-anchor-color: #4caaee;--cucumber-keyword-color: #d89077;--cucumber-parameter-color: #4caaee;--cucumber-tag-color: #85a658;--cucumber-docstring-color: #66a565;--cucumber-error-background-color: #cf6679;--cucumber-error-text-color: #222;--cucumber-code-background-color: #282a36;--cucumber-code-text-color: #f8f8f2;--cucumber-panel-background-color: #282a36;--cucumber-panel-accent-color: #313442;--cucumber-panel-text-color: #f8f8f2}@media all and (prefers-color-scheme: dark){.pPHXjw4HiiEZ76UmW2np{--cucumber-background-color: #1d1d26;--cucumber-text-color: #c9c9d1;--cucumber-anchor-color: #4caaee;--cucumber-keyword-color: #d89077;--cucumber-parameter-color: #4caaee;--cucumber-tag-color: #85a658;--cucumber-docstring-color: #66a565;--cucumber-error-background-color: #cf6679;--cucumber-error-text-color: #222;--cucumber-code-background-color: #282a36;--cucumber-code-text-color: #f8f8f2;--cucumber-panel-background-color: #282a36;--cucumber-panel-accent-color: #313442;--cucumber-panel-text-color: #f8f8f2}}
36
+
37
+ </style>
38
+ </head>
39
+ <body>
40
+ <div id="content">
41
+ </div>
42
+ <script>
43
+ window.CUCUMBER_MESSAGES = [{"meta":{"protocolVersion":"27.0.2","implementation":{"version":"11.2.0","name":"cucumber-js"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.3.0"},"runtime":{"name":"node.js","version":"22.14.0"}}},{"source":{"data":"Feature: Run load tests with dynamic GET and POST body from environment variables and JSON files\n\n Scenario Outline: I run the k6 script for load testing with dynamic POST body from environment variables and JSON files\n Given I have a k6 script for POST testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration | http_req_failed | http_req_duration | error_rate |\n | <virtual_users> | <duration> | <http_req_failed> | <http_req_duration> | <error_rate> |\n When the following endpoint(s) is\/are used:\n \"\"\"\n \/api\/profile\n http:\/\/test.k6.io\n \"\"\"\n When the following POST body is used for \"<endpoint>\"\n \"\"\"\n {\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n }\n \"\"\"\n When the authentication type is \"api_key\"\n Then the API should handle the POST request successfully\n\n Examples:\n | virtual_users | duration | http_req_failed | http_req_duration | error_rate |\n | 10 | 5 | rate<0.05 | p(95)<3000 | rate<0.05 |\n | 50 | 10 | rate<0.05 | p(95)<3000 | rate<0.05 |\n | 100 | 15 | rate<0.05 | p(95)<3500 | |\n | 200 | 20 | rate<0.05 | p(95)<3500 | rate<0.05 |\n\n @loadTest\n Scenario Outline: I run the k6 script for load testing with dynamic GET requests\n Given I have a k6 script for GET testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration | http_req_failed | http_req_duration | error_rate |\n | <virtual_users> | <duration> | <http_req_failed> | <http_req_duration> | <error_rate> |\n And the following endpoint(s) is\/are used:\n \"\"\"\n \/api\/profile\n https:\/\/reqres.in\/api\/users?page=2\n \"\"\"\n When the authentication type is \"none\"\n Then the API should handle the GET request successfully\n\n Examples:\n | virtual_users | duration | http_req_failed | http_req_duration |\n | 10 | 5 | rate<0.05 | p(95)<3000 |\n | 50 | 10 | rate<0.05 | p(95)<3000 |\n | 100 | 15 | rate<0.05 | p(95)<3500 |\n | 200 | 20 | rate<0.05 | p(95)<3500 |\n","uri":"src\/examples\/features\/loadTestTemplate.feature","mediaType":"text\/x.cucumber.gherkin+plain"}},{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Run load tests with dynamic GET and POST body from environment variables and JSON files","description":"","children":[{"scenario":{"id":"c481dc3f-3b78-4beb-9924-4b79a5488536","tags":[],"location":{"line":3,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for load testing with dynamic POST body from environment variables and JSON files","description":"","steps":[{"id":"f69f7a2d-ac6a-47e5-b24c-6d403c87dd35","location":{"line":4,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for POST testing"},{"id":"27263b8e-d456-4c2d-9353-8af750e63339","location":{"line":5,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":6,"column":7},"rows":[{"id":"d2edb0a8-0bb2-47d5-8331-90ac299eb738","location":{"line":6,"column":7},"cells":[{"location":{"line":6,"column":9},"value":"virtual_users"},{"location":{"line":6,"column":27},"value":"duration"},{"location":{"line":6,"column":40},"value":"http_req_failed"},{"location":{"line":6,"column":60},"value":"http_req_duration"},{"location":{"line":6,"column":82},"value":"error_rate"}]},{"id":"7d1a93fa-f843-4253-97b4-da6f3ab14567","location":{"line":7,"column":7},"cells":[{"location":{"line":7,"column":9},"value":"<virtual_users>"},{"location":{"line":7,"column":27},"value":"<duration>"},{"location":{"line":7,"column":40},"value":"<http_req_failed>"},{"location":{"line":7,"column":60},"value":"<http_req_duration>"},{"location":{"line":7,"column":82},"value":"<error_rate>"}]}]}},{"id":"47290cee-c04e-4b46-ba57-b4cf530ccf64","location":{"line":8,"column":5},"keyword":"When ","keywordType":"Action","text":"the following endpoint(s) is\/are used:","docString":{"location":{"line":9,"column":7},"content":"\/api\/profile\nhttp:\/\/test.k6.io","delimiter":"\"\"\""}},{"id":"02a8a50b-5d65-4c82-abdc-6613e3ba415c","location":{"line":13,"column":5},"keyword":"When ","keywordType":"Action","text":"the following POST body is used for \"<endpoint>\"","docString":{"location":{"line":14,"column":7},"content":"{\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n}","delimiter":"\"\"\""}},{"id":"e11c4743-c01c-4e0b-8f1f-f3417bf71f74","location":{"line":21,"column":5},"keyword":"When ","keywordType":"Action","text":"the authentication type is \"api_key\""},{"id":"733bc4a7-aaf6-477c-a27c-fe7d081e87bb","location":{"line":22,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the POST request successfully"}],"examples":[{"id":"511a2835-e251-428e-b267-a4f4dab0abfd","tags":[],"location":{"line":24,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"94e389f5-b58c-4c93-a7e9-a943376719db","location":{"line":25,"column":7},"cells":[{"location":{"line":25,"column":9},"value":"virtual_users"},{"location":{"line":25,"column":25},"value":"duration"},{"location":{"line":25,"column":36},"value":"http_req_failed"},{"location":{"line":25,"column":54},"value":"http_req_duration"},{"location":{"line":25,"column":74},"value":"error_rate"}]},"tableBody":[{"id":"b0c46112-7ba5-4122-a32a-99c73c3ee3e5","location":{"line":26,"column":7},"cells":[{"location":{"line":26,"column":20},"value":"10"},{"location":{"line":26,"column":32},"value":"5"},{"location":{"line":26,"column":36},"value":"rate<0.05"},{"location":{"line":26,"column":54},"value":"p(95)<3000"},{"location":{"line":26,"column":74},"value":"rate<0.05"}]},{"id":"c0f576d3-f846-4aba-a17e-8469a89518fd","location":{"line":27,"column":7},"cells":[{"location":{"line":27,"column":20},"value":"50"},{"location":{"line":27,"column":31},"value":"10"},{"location":{"line":27,"column":36},"value":"rate<0.05"},{"location":{"line":27,"column":54},"value":"p(95)<3000"},{"location":{"line":27,"column":74},"value":"rate<0.05"}]},{"id":"6883b5af-6ccf-4407-b732-76c8613f20f5","location":{"line":28,"column":7},"cells":[{"location":{"line":28,"column":19},"value":"100"},{"location":{"line":28,"column":31},"value":"15"},{"location":{"line":28,"column":36},"value":"rate<0.05"},{"location":{"line":28,"column":54},"value":"p(95)<3500"},{"location":{"line":28,"column":85},"value":""}]},{"id":"f1f0172c-9610-45a9-93e8-2629097351c0","location":{"line":29,"column":7},"cells":[{"location":{"line":29,"column":19},"value":"200"},{"location":{"line":29,"column":31},"value":"20"},{"location":{"line":29,"column":36},"value":"rate<0.05"},{"location":{"line":29,"column":54},"value":"p(95)<3500"},{"location":{"line":29,"column":74},"value":"rate<0.05"}]}]}]}},{"scenario":{"id":"ed4e1e26-ffa4-4314-a3bd-8ece57898b81","tags":[{"location":{"line":31,"column":3},"name":"@loadTest","id":"910077a9-7909-41f4-aa03-a166fbc78dea"}],"location":{"line":32,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for load testing with dynamic GET requests","description":"","steps":[{"id":"a76b5fd7-f709-4af1-9013-ff166e3e1fde","location":{"line":33,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for GET testing"},{"id":"6a19deef-98db-45dc-a680-a263e07087a2","location":{"line":34,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":35,"column":7},"rows":[{"id":"d52405b3-c343-4aa0-bb59-8b3cb743e6a9","location":{"line":35,"column":7},"cells":[{"location":{"line":35,"column":9},"value":"virtual_users"},{"location":{"line":35,"column":27},"value":"duration"},{"location":{"line":35,"column":40},"value":"http_req_failed"},{"location":{"line":35,"column":60},"value":"http_req_duration"},{"location":{"line":35,"column":82},"value":"error_rate"}]},{"id":"cc392980-3799-4794-a4d9-9ba80ad6c672","location":{"line":36,"column":7},"cells":[{"location":{"line":36,"column":9},"value":"<virtual_users>"},{"location":{"line":36,"column":27},"value":"<duration>"},{"location":{"line":36,"column":40},"value":"<http_req_failed>"},{"location":{"line":36,"column":60},"value":"<http_req_duration>"},{"location":{"line":36,"column":82},"value":"<error_rate>"}]}]}},{"id":"825c373f-72ff-4a71-bebf-935d5fb9d191","location":{"line":37,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint(s) is\/are used:","docString":{"location":{"line":38,"column":7},"content":"\/api\/profile\nhttps:\/\/reqres.in\/api\/users?page=2","delimiter":"\"\"\""}},{"id":"81e35764-3080-4624-8028-7e632dd1b442","location":{"line":42,"column":5},"keyword":"When ","keywordType":"Action","text":"the authentication type is \"none\""},{"id":"1265fb6c-5033-41b8-a79a-6b6a41b2be88","location":{"line":43,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the GET request successfully"}],"examples":[{"id":"2c299e12-5a2e-437b-aa35-4b9abf780ef6","tags":[],"location":{"line":45,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"1577f9af-4d7b-4ccc-b9a6-6770410cf0be","location":{"line":46,"column":7},"cells":[{"location":{"line":46,"column":9},"value":"virtual_users"},{"location":{"line":46,"column":25},"value":"duration"},{"location":{"line":46,"column":36},"value":"http_req_failed"},{"location":{"line":46,"column":54},"value":"http_req_duration"}]},"tableBody":[{"id":"db15889c-7f3c-4ffb-bdf6-45b22b50abc5","location":{"line":47,"column":7},"cells":[{"location":{"line":47,"column":20},"value":"10"},{"location":{"line":47,"column":32},"value":"5"},{"location":{"line":47,"column":36},"value":"rate<0.05"},{"location":{"line":47,"column":54},"value":"p(95)<3000"}]},{"id":"8c5db85f-5404-4a27-be8f-08b8cd646937","location":{"line":48,"column":7},"cells":[{"location":{"line":48,"column":20},"value":"50"},{"location":{"line":48,"column":31},"value":"10"},{"location":{"line":48,"column":36},"value":"rate<0.05"},{"location":{"line":48,"column":54},"value":"p(95)<3000"}]},{"id":"671f4787-07a3-42d3-9940-13d159beda60","location":{"line":49,"column":7},"cells":[{"location":{"line":49,"column":19},"value":"100"},{"location":{"line":49,"column":31},"value":"15"},{"location":{"line":49,"column":36},"value":"rate<0.05"},{"location":{"line":49,"column":54},"value":"p(95)<3500"}]},{"id":"58fe861c-d1fb-4886-bb6b-d7cda3081b8f","location":{"line":50,"column":7},"cells":[{"location":{"line":50,"column":19},"value":"200"},{"location":{"line":50,"column":31},"value":"20"},{"location":{"line":50,"column":36},"value":"rate<0.05"},{"location":{"line":50,"column":54},"value":"p(95)<3500"}]}]}]}}]},"comments":[],"uri":"src\/examples\/features\/loadTestTemplate.feature"}},{"pickle":{"id":"204f9dad-0e18-4fc7-8d9c-f041701b64c0","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["c481dc3f-3b78-4beb-9924-4b79a5488536","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"],"name":"I run the k6 script for load testing with dynamic POST body from environment variables and JSON files","language":"en","steps":[{"id":"efecb8f4-5a91-495a-8f77-2554f2cf5449","text":"I have a k6 script for POST testing","type":"Context","astNodeIds":["f69f7a2d-ac6a-47e5-b24c-6d403c87dd35","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"]},{"id":"e8bd1b31-db39-497d-b731-35c2609937d7","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"10"},{"value":"5"},{"value":"rate<0.05"},{"value":"p(95)<3000"},{"value":"rate<0.05"}]}]}},"astNodeIds":["27263b8e-d456-4c2d-9353-8af750e63339","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"]},{"id":"01e77336-5a89-469f-8bb2-e789fbe00965","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttp:\/\/test.k6.io"}},"astNodeIds":["47290cee-c04e-4b46-ba57-b4cf530ccf64","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"]},{"id":"70ce15b0-3c22-48ea-b78f-05443aaf0a74","text":"the following POST body is used for \"<endpoint>\"","type":"Action","argument":{"docString":{"content":"{\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n}"}},"astNodeIds":["02a8a50b-5d65-4c82-abdc-6613e3ba415c","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"]},{"id":"a51f5cb0-e24a-4019-abaa-9e7756098044","text":"the authentication type is \"api_key\"","type":"Action","astNodeIds":["e11c4743-c01c-4e0b-8f1f-f3417bf71f74","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"]},{"id":"1412d856-2325-4733-983b-2ca766fb95a7","text":"the API should handle the POST request successfully","type":"Outcome","astNodeIds":["733bc4a7-aaf6-477c-a27c-fe7d081e87bb","b0c46112-7ba5-4122-a32a-99c73c3ee3e5"]}],"tags":[]}},{"pickle":{"id":"5af62098-fd1c-4479-b2f2-af990c84915a","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["c481dc3f-3b78-4beb-9924-4b79a5488536","c0f576d3-f846-4aba-a17e-8469a89518fd"],"name":"I run the k6 script for load testing with dynamic POST body from environment variables and JSON files","language":"en","steps":[{"id":"51e56a8b-c50c-4331-a724-830bc6455381","text":"I have a k6 script for POST testing","type":"Context","astNodeIds":["f69f7a2d-ac6a-47e5-b24c-6d403c87dd35","c0f576d3-f846-4aba-a17e-8469a89518fd"]},{"id":"f1056a5e-a2bd-4816-9804-6721cc08103d","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"50"},{"value":"10"},{"value":"rate<0.05"},{"value":"p(95)<3000"},{"value":"rate<0.05"}]}]}},"astNodeIds":["27263b8e-d456-4c2d-9353-8af750e63339","c0f576d3-f846-4aba-a17e-8469a89518fd"]},{"id":"0f5926e4-09d8-41e6-9d0f-f773b1f6fdcc","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttp:\/\/test.k6.io"}},"astNodeIds":["47290cee-c04e-4b46-ba57-b4cf530ccf64","c0f576d3-f846-4aba-a17e-8469a89518fd"]},{"id":"3d717407-4071-460e-910f-a9959abc15d4","text":"the following POST body is used for \"<endpoint>\"","type":"Action","argument":{"docString":{"content":"{\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n}"}},"astNodeIds":["02a8a50b-5d65-4c82-abdc-6613e3ba415c","c0f576d3-f846-4aba-a17e-8469a89518fd"]},{"id":"7b3388cf-d35b-4e54-b6a2-06135f408b93","text":"the authentication type is \"api_key\"","type":"Action","astNodeIds":["e11c4743-c01c-4e0b-8f1f-f3417bf71f74","c0f576d3-f846-4aba-a17e-8469a89518fd"]},{"id":"53e753a0-0a5b-41a0-b86a-a1ffb26cd0ef","text":"the API should handle the POST request successfully","type":"Outcome","astNodeIds":["733bc4a7-aaf6-477c-a27c-fe7d081e87bb","c0f576d3-f846-4aba-a17e-8469a89518fd"]}],"tags":[]}},{"pickle":{"id":"6bfee657-9e96-4294-9cc7-6b8449a401ab","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["c481dc3f-3b78-4beb-9924-4b79a5488536","6883b5af-6ccf-4407-b732-76c8613f20f5"],"name":"I run the k6 script for load testing with dynamic POST body from environment variables and JSON files","language":"en","steps":[{"id":"1b645ceb-5da0-4adb-90e7-ef6a7469d995","text":"I have a k6 script for POST testing","type":"Context","astNodeIds":["f69f7a2d-ac6a-47e5-b24c-6d403c87dd35","6883b5af-6ccf-4407-b732-76c8613f20f5"]},{"id":"6d17cf3d-f2b2-4f98-a88f-5bcfd5b2daae","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"100"},{"value":"15"},{"value":"rate<0.05"},{"value":"p(95)<3500"},{"value":""}]}]}},"astNodeIds":["27263b8e-d456-4c2d-9353-8af750e63339","6883b5af-6ccf-4407-b732-76c8613f20f5"]},{"id":"eb8bdb2a-1fae-4500-b6c5-d1efb4161324","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttp:\/\/test.k6.io"}},"astNodeIds":["47290cee-c04e-4b46-ba57-b4cf530ccf64","6883b5af-6ccf-4407-b732-76c8613f20f5"]},{"id":"b27f4e96-e0ee-4940-8a61-3875eca85d80","text":"the following POST body is used for \"<endpoint>\"","type":"Action","argument":{"docString":{"content":"{\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n}"}},"astNodeIds":["02a8a50b-5d65-4c82-abdc-6613e3ba415c","6883b5af-6ccf-4407-b732-76c8613f20f5"]},{"id":"15448f47-5c7e-4dc1-9cf0-87ef43800486","text":"the authentication type is \"api_key\"","type":"Action","astNodeIds":["e11c4743-c01c-4e0b-8f1f-f3417bf71f74","6883b5af-6ccf-4407-b732-76c8613f20f5"]},{"id":"9ae4d161-ef74-4f66-84a2-c0e5313bbd56","text":"the API should handle the POST request successfully","type":"Outcome","astNodeIds":["733bc4a7-aaf6-477c-a27c-fe7d081e87bb","6883b5af-6ccf-4407-b732-76c8613f20f5"]}],"tags":[]}},{"pickle":{"id":"0b031224-2838-4ad5-8d08-11d07fe3df57","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["c481dc3f-3b78-4beb-9924-4b79a5488536","f1f0172c-9610-45a9-93e8-2629097351c0"],"name":"I run the k6 script for load testing with dynamic POST body from environment variables and JSON files","language":"en","steps":[{"id":"c1a0f1a9-fc2e-4a5d-a96f-603441aaeed8","text":"I have a k6 script for POST testing","type":"Context","astNodeIds":["f69f7a2d-ac6a-47e5-b24c-6d403c87dd35","f1f0172c-9610-45a9-93e8-2629097351c0"]},{"id":"68c70aac-e4bf-41b1-8398-12561b8c9492","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"200"},{"value":"20"},{"value":"rate<0.05"},{"value":"p(95)<3500"},{"value":"rate<0.05"}]}]}},"astNodeIds":["27263b8e-d456-4c2d-9353-8af750e63339","f1f0172c-9610-45a9-93e8-2629097351c0"]},{"id":"7497d66b-06b1-436d-9863-1fccaec9aace","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttp:\/\/test.k6.io"}},"astNodeIds":["47290cee-c04e-4b46-ba57-b4cf530ccf64","f1f0172c-9610-45a9-93e8-2629097351c0"]},{"id":"124537af-ae60-42e8-8397-a9d3eec23a15","text":"the following POST body is used for \"<endpoint>\"","type":"Action","argument":{"docString":{"content":"{\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n}"}},"astNodeIds":["02a8a50b-5d65-4c82-abdc-6613e3ba415c","f1f0172c-9610-45a9-93e8-2629097351c0"]},{"id":"1f1c9b30-29dd-4880-a29f-d30b2e439da5","text":"the authentication type is \"api_key\"","type":"Action","astNodeIds":["e11c4743-c01c-4e0b-8f1f-f3417bf71f74","f1f0172c-9610-45a9-93e8-2629097351c0"]},{"id":"3f57903c-f0d1-4f58-8e2f-9b4d741f7a7d","text":"the API should handle the POST request successfully","type":"Outcome","astNodeIds":["733bc4a7-aaf6-477c-a27c-fe7d081e87bb","f1f0172c-9610-45a9-93e8-2629097351c0"]}],"tags":[]}},{"pickle":{"id":"18f832eb-1243-4451-a04f-1c355f49727c","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["ed4e1e26-ffa4-4314-a3bd-8ece57898b81","db15889c-7f3c-4ffb-bdf6-45b22b50abc5"],"name":"I run the k6 script for load testing with dynamic GET requests","language":"en","steps":[{"id":"fbc08113-de9f-4830-bd47-5f8a086f545b","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["a76b5fd7-f709-4af1-9013-ff166e3e1fde","db15889c-7f3c-4ffb-bdf6-45b22b50abc5"]},{"id":"cd251d6b-47b8-4d90-a7ab-b0aa1db45af4","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"10"},{"value":"5"},{"value":"rate<0.05"},{"value":"p(95)<3000"},{"value":"<error_rate>"}]}]}},"astNodeIds":["6a19deef-98db-45dc-a680-a263e07087a2","db15889c-7f3c-4ffb-bdf6-45b22b50abc5"]},{"id":"59f9f14d-c7f1-4e02-a5f2-f164725c30ee","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttps:\/\/reqres.in\/api\/users?page=2"}},"astNodeIds":["825c373f-72ff-4a71-bebf-935d5fb9d191","db15889c-7f3c-4ffb-bdf6-45b22b50abc5"]},{"id":"c46923fa-5426-4275-92a9-fcca1d75c4fa","text":"the authentication type is \"none\"","type":"Action","astNodeIds":["81e35764-3080-4624-8028-7e632dd1b442","db15889c-7f3c-4ffb-bdf6-45b22b50abc5"]},{"id":"c3602baa-5015-429d-9523-4800e20c9329","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["1265fb6c-5033-41b8-a79a-6b6a41b2be88","db15889c-7f3c-4ffb-bdf6-45b22b50abc5"]}],"tags":[{"name":"@loadTest","astNodeId":"910077a9-7909-41f4-aa03-a166fbc78dea"}]}},{"pickle":{"id":"b1052f7b-4642-4a8b-9ef1-5093b0d95b25","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["ed4e1e26-ffa4-4314-a3bd-8ece57898b81","8c5db85f-5404-4a27-be8f-08b8cd646937"],"name":"I run the k6 script for load testing with dynamic GET requests","language":"en","steps":[{"id":"0c73c22a-cf30-42f5-86b0-02f3ec0785ea","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["a76b5fd7-f709-4af1-9013-ff166e3e1fde","8c5db85f-5404-4a27-be8f-08b8cd646937"]},{"id":"42f45a79-71a1-4d33-8336-795a1cf1a553","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"50"},{"value":"10"},{"value":"rate<0.05"},{"value":"p(95)<3000"},{"value":"<error_rate>"}]}]}},"astNodeIds":["6a19deef-98db-45dc-a680-a263e07087a2","8c5db85f-5404-4a27-be8f-08b8cd646937"]},{"id":"6a068a5e-cde3-4c1e-a6aa-d914c61d17b2","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttps:\/\/reqres.in\/api\/users?page=2"}},"astNodeIds":["825c373f-72ff-4a71-bebf-935d5fb9d191","8c5db85f-5404-4a27-be8f-08b8cd646937"]},{"id":"0c4e10ed-1ec9-4c05-9c3d-4f99e1c5702c","text":"the authentication type is \"none\"","type":"Action","astNodeIds":["81e35764-3080-4624-8028-7e632dd1b442","8c5db85f-5404-4a27-be8f-08b8cd646937"]},{"id":"e069cbb8-d45d-4bc0-a783-cb67356e37fa","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["1265fb6c-5033-41b8-a79a-6b6a41b2be88","8c5db85f-5404-4a27-be8f-08b8cd646937"]}],"tags":[{"name":"@loadTest","astNodeId":"910077a9-7909-41f4-aa03-a166fbc78dea"}]}},{"pickle":{"id":"becd51ba-3712-499f-a258-825a9e484a6d","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["ed4e1e26-ffa4-4314-a3bd-8ece57898b81","671f4787-07a3-42d3-9940-13d159beda60"],"name":"I run the k6 script for load testing with dynamic GET requests","language":"en","steps":[{"id":"1fb0e17c-ea1b-4add-97b3-54a7a2ce2072","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["a76b5fd7-f709-4af1-9013-ff166e3e1fde","671f4787-07a3-42d3-9940-13d159beda60"]},{"id":"e07b39b9-737f-4687-b05a-005ea2ce37de","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"100"},{"value":"15"},{"value":"rate<0.05"},{"value":"p(95)<3500"},{"value":"<error_rate>"}]}]}},"astNodeIds":["6a19deef-98db-45dc-a680-a263e07087a2","671f4787-07a3-42d3-9940-13d159beda60"]},{"id":"5d9e6f8c-49a4-412b-a0b8-aea729fabd96","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttps:\/\/reqres.in\/api\/users?page=2"}},"astNodeIds":["825c373f-72ff-4a71-bebf-935d5fb9d191","671f4787-07a3-42d3-9940-13d159beda60"]},{"id":"d03acf3e-9a8f-4bfe-a02b-b5249687fb7b","text":"the authentication type is \"none\"","type":"Action","astNodeIds":["81e35764-3080-4624-8028-7e632dd1b442","671f4787-07a3-42d3-9940-13d159beda60"]},{"id":"6ca7200a-d0b8-43a9-bc72-33c94d0a833f","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["1265fb6c-5033-41b8-a79a-6b6a41b2be88","671f4787-07a3-42d3-9940-13d159beda60"]}],"tags":[{"name":"@loadTest","astNodeId":"910077a9-7909-41f4-aa03-a166fbc78dea"}]}},{"pickle":{"id":"cd52722e-6cb5-4e63-870a-8c07204c5cb7","uri":"src\/examples\/features\/loadTestTemplate.feature","astNodeIds":["ed4e1e26-ffa4-4314-a3bd-8ece57898b81","58fe861c-d1fb-4886-bb6b-d7cda3081b8f"],"name":"I run the k6 script for load testing with dynamic GET requests","language":"en","steps":[{"id":"3fe6aa27-06c4-4fcd-901b-9ca8caa47cc1","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["a76b5fd7-f709-4af1-9013-ff166e3e1fde","58fe861c-d1fb-4886-bb6b-d7cda3081b8f"]},{"id":"bf85c136-f871-4d9a-b556-1be70e0e68e5","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"200"},{"value":"20"},{"value":"rate<0.05"},{"value":"p(95)<3500"},{"value":"<error_rate>"}]}]}},"astNodeIds":["6a19deef-98db-45dc-a680-a263e07087a2","58fe861c-d1fb-4886-bb6b-d7cda3081b8f"]},{"id":"18b73c37-c275-48d2-b19c-f8aedbc3cbe7","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/profile\nhttps:\/\/reqres.in\/api\/users?page=2"}},"astNodeIds":["825c373f-72ff-4a71-bebf-935d5fb9d191","58fe861c-d1fb-4886-bb6b-d7cda3081b8f"]},{"id":"31e475a8-3e24-4a7d-8282-b7a1154bb5c2","text":"the authentication type is \"none\"","type":"Action","astNodeIds":["81e35764-3080-4624-8028-7e632dd1b442","58fe861c-d1fb-4886-bb6b-d7cda3081b8f"]},{"id":"652ff689-5213-4845-be71-08c49d66d8fc","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["1265fb6c-5033-41b8-a79a-6b6a41b2be88","58fe861c-d1fb-4886-bb6b-d7cda3081b8f"]}],"tags":[{"name":"@loadTest","astNodeId":"910077a9-7909-41f4-aa03-a166fbc78dea"}]}},{"source":{"data":"Feature: Extended Load Testing with PUT, DELETE, and Multipart Uploads\n\n Scenario Outline: I run the k6 script for load testing with PUT requests\n Given I have a k6 script for PUT testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration |\n | <virtual_users> | <duration> |\n And the following endpoint is used: \"<endpoint>\"\n When the following PUT body is used:\n \"\"\"\n {\n \"userId\": \"{{user_id}}\",\n \"status\": \"{{status}}\"\n }\n \"\"\"\n And the authentication type is \"bearer_token\"\n Then the API should handle the PUT request successfully\n\n Examples:\n | virtual_users | duration | endpoint |\n | 10 | 5 | \/api\/v1\/update-status |\n\n Scenario Outline: I run the k6 script for load testing with DELETE requests\n Given I have a k6 script for DELETE testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration |\n | <virtual_users> | <duration> |\n And the following endpoint is used: \"<endpoint>\"\n And the authentication type is \"api_key\"\n Then the API should handle the DELETE request successfully\n\n Examples:\n | virtual_users | duration | endpoint |\n | 20 | 3 | \/api\/v1\/delete-record |\n\n Scenario Outline: I run the k6 script for load testing with multipart\/form-data requests\n Given I have a k6 script for multipart POST testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration |\n | <virtual_users> | <duration> |\n And the following endpoint is used: \"<endpoint>\"\n When the following multipart body is used:\n \"\"\"\n file: <sample.pdf>\n description: {{file_description}}\n \"\"\"\n And the authentication type is \"bearer_token\"\n Then the API should handle multipart request successfully\n\n Examples:\n | virtual_users | duration | endpoint |\n | 15 | 5 | \/api\/v1\/upload-file |\n","uri":"src\/examples\/features\/putDeleteMultipartUploads.feature","mediaType":"text\/x.cucumber.gherkin+plain"}},{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Extended Load Testing with PUT, DELETE, and Multipart Uploads","description":"","children":[{"scenario":{"id":"b5c86c73-fe76-4868-a0c1-b139bfaadf7e","tags":[],"location":{"line":3,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for load testing with PUT requests","description":"","steps":[{"id":"18ccfe1b-8c34-48dd-912b-1f09154bbe25","location":{"line":4,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for PUT testing"},{"id":"ca797732-abd6-46c6-9a56-eefa4efc6a94","location":{"line":5,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":6,"column":7},"rows":[{"id":"e5782bda-71eb-4519-a59e-42e8f8e4219e","location":{"line":6,"column":7},"cells":[{"location":{"line":6,"column":9},"value":"virtual_users"},{"location":{"line":6,"column":27},"value":"duration"}]},{"id":"85f16ae4-1088-45d0-8cf2-0ae5900d8db9","location":{"line":7,"column":7},"cells":[{"location":{"line":7,"column":9},"value":"<virtual_users>"},{"location":{"line":7,"column":27},"value":"<duration>"}]}]}},{"id":"503c5f9b-cc22-4d37-ac5a-f4c6f784fcd3","location":{"line":8,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint is used: \"<endpoint>\""},{"id":"b7e3f6af-aef9-4531-b314-fa7cfb640c61","location":{"line":9,"column":5},"keyword":"When ","keywordType":"Action","text":"the following PUT body is used:","docString":{"location":{"line":10,"column":7},"content":"{\n \"userId\": \"{{user_id}}\",\n \"status\": \"{{status}}\"\n}","delimiter":"\"\"\""}},{"id":"88bc3205-746a-46ac-90ce-facce5742e15","location":{"line":16,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the authentication type is \"bearer_token\""},{"id":"18988aba-1482-4faf-bfe5-f3303f196159","location":{"line":17,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the PUT request successfully"}],"examples":[{"id":"5f93ca3e-ca99-41d1-90b8-3d6fc477e563","tags":[],"location":{"line":19,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"286acc1e-3975-490c-94cf-10dc13745b39","location":{"line":20,"column":7},"cells":[{"location":{"line":20,"column":9},"value":"virtual_users"},{"location":{"line":20,"column":25},"value":"duration"},{"location":{"line":20,"column":36},"value":"endpoint"}]},"tableBody":[{"id":"95388dd8-8863-498f-92f3-1aae73519b9d","location":{"line":21,"column":7},"cells":[{"location":{"line":21,"column":20},"value":"10"},{"location":{"line":21,"column":32},"value":"5"},{"location":{"line":21,"column":36},"value":"\/api\/v1\/update-status"}]}]}]}},{"scenario":{"id":"68708d8c-c24a-492e-84a4-d00ad7b19e4d","tags":[],"location":{"line":23,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for load testing with DELETE requests","description":"","steps":[{"id":"3d35e5a5-515b-4fb0-8f89-648a1645ecfb","location":{"line":24,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for DELETE testing"},{"id":"3260f5d4-9798-492d-bbcd-19f7cab153de","location":{"line":25,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":26,"column":7},"rows":[{"id":"6e361409-e0f5-48dc-a167-185df59496c6","location":{"line":26,"column":7},"cells":[{"location":{"line":26,"column":9},"value":"virtual_users"},{"location":{"line":26,"column":27},"value":"duration"}]},{"id":"a19cefd7-3e5b-42b0-9ce7-0b3f8dbf9818","location":{"line":27,"column":7},"cells":[{"location":{"line":27,"column":9},"value":"<virtual_users>"},{"location":{"line":27,"column":27},"value":"<duration>"}]}]}},{"id":"e220c90f-d98b-4b7f-b4a9-09c5fe1b2083","location":{"line":28,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint is used: \"<endpoint>\""},{"id":"0cdb6d73-240d-4318-acc1-25df3db3f269","location":{"line":29,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the authentication type is \"api_key\""},{"id":"a449b633-ea88-4937-8d86-37146fecf8f3","location":{"line":30,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the DELETE request successfully"}],"examples":[{"id":"9029ecc7-6d36-4eba-9315-a7af5aeb8a01","tags":[],"location":{"line":32,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"3bcb1f82-46a2-404a-a29e-710a5a223e64","location":{"line":33,"column":7},"cells":[{"location":{"line":33,"column":9},"value":"virtual_users"},{"location":{"line":33,"column":25},"value":"duration"},{"location":{"line":33,"column":36},"value":"endpoint"}]},"tableBody":[{"id":"58adb060-4905-4ea7-9f51-212dd5b10d80","location":{"line":34,"column":7},"cells":[{"location":{"line":34,"column":20},"value":"20"},{"location":{"line":34,"column":32},"value":"3"},{"location":{"line":34,"column":36},"value":"\/api\/v1\/delete-record"}]}]}]}},{"scenario":{"id":"ca32e1c9-a1f6-4dc3-b0cd-16ae77320bc8","tags":[],"location":{"line":36,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for load testing with multipart\/form-data requests","description":"","steps":[{"id":"2ddfde2c-8018-4ebb-a94b-0319d4c1bf88","location":{"line":37,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for multipart POST testing"},{"id":"a234fd4d-b673-4625-af06-01ba7232bc80","location":{"line":38,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":39,"column":7},"rows":[{"id":"7315c569-f7fe-4079-951c-413d733736e1","location":{"line":39,"column":7},"cells":[{"location":{"line":39,"column":9},"value":"virtual_users"},{"location":{"line":39,"column":27},"value":"duration"}]},{"id":"395425c5-314b-4377-b1c1-0f0c7170233b","location":{"line":40,"column":7},"cells":[{"location":{"line":40,"column":9},"value":"<virtual_users>"},{"location":{"line":40,"column":27},"value":"<duration>"}]}]}},{"id":"164e5b31-7548-42aa-a870-52a328b58b8c","location":{"line":41,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint is used: \"<endpoint>\""},{"id":"2a8a0e8d-d676-41db-8387-6424a1ec9ab0","location":{"line":42,"column":5},"keyword":"When ","keywordType":"Action","text":"the following multipart body is used:","docString":{"location":{"line":43,"column":7},"content":"file: <sample.pdf>\ndescription: {{file_description}}","delimiter":"\"\"\""}},{"id":"82876da4-8abf-4650-a399-eb9524bd46a0","location":{"line":47,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the authentication type is \"bearer_token\""},{"id":"49c58b51-8ab1-4c57-8090-fe6a5c143dce","location":{"line":48,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle multipart request successfully"}],"examples":[{"id":"f1e975bd-d553-4a59-afdd-fe003a66e169","tags":[],"location":{"line":50,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"8ce965cb-7c06-44d0-ac71-8f37cd4829af","location":{"line":51,"column":7},"cells":[{"location":{"line":51,"column":9},"value":"virtual_users"},{"location":{"line":51,"column":25},"value":"duration"},{"location":{"line":51,"column":36},"value":"endpoint"}]},"tableBody":[{"id":"9a0bb57b-8c91-4c6e-a390-812267412cfa","location":{"line":52,"column":7},"cells":[{"location":{"line":52,"column":20},"value":"15"},{"location":{"line":52,"column":32},"value":"5"},{"location":{"line":52,"column":36},"value":"\/api\/v1\/upload-file"}]}]}]}}]},"comments":[],"uri":"src\/examples\/features\/putDeleteMultipartUploads.feature"}},{"pickle":{"id":"66164976-5690-4bb8-9dc1-cfdbe681f9d4","uri":"src\/examples\/features\/putDeleteMultipartUploads.feature","astNodeIds":["b5c86c73-fe76-4868-a0c1-b139bfaadf7e","95388dd8-8863-498f-92f3-1aae73519b9d"],"name":"I run the k6 script for load testing with PUT requests","language":"en","steps":[{"id":"09eb2988-b3d0-4570-9d26-88abd73ca498","text":"I have a k6 script for PUT testing","type":"Context","astNodeIds":["18ccfe1b-8c34-48dd-912b-1f09154bbe25","95388dd8-8863-498f-92f3-1aae73519b9d"]},{"id":"fa5cf7ff-ccaa-4694-8911-b0a9a7b1d1a8","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"}]},{"cells":[{"value":"10"},{"value":"5"}]}]}},"astNodeIds":["ca797732-abd6-46c6-9a56-eefa4efc6a94","95388dd8-8863-498f-92f3-1aae73519b9d"]},{"id":"309aaf3c-7a48-45b0-b46b-39b10038cf9a","text":"the following endpoint is used: \"\/api\/v1\/update-status\"","type":"Action","astNodeIds":["503c5f9b-cc22-4d37-ac5a-f4c6f784fcd3","95388dd8-8863-498f-92f3-1aae73519b9d"]},{"id":"9a0b8e6f-1224-405e-8d4a-081aa7d4b798","text":"the following PUT body is used:","type":"Action","argument":{"docString":{"content":"{\n \"userId\": \"{{user_id}}\",\n \"status\": \"{{status}}\"\n}"}},"astNodeIds":["b7e3f6af-aef9-4531-b314-fa7cfb640c61","95388dd8-8863-498f-92f3-1aae73519b9d"]},{"id":"52a5ee5e-800a-4173-88a7-407d557d56d2","text":"the authentication type is \"bearer_token\"","type":"Action","astNodeIds":["88bc3205-746a-46ac-90ce-facce5742e15","95388dd8-8863-498f-92f3-1aae73519b9d"]},{"id":"4b798be4-a0ba-47c9-a8cc-9771d07f43b7","text":"the API should handle the PUT request successfully","type":"Outcome","astNodeIds":["18988aba-1482-4faf-bfe5-f3303f196159","95388dd8-8863-498f-92f3-1aae73519b9d"]}],"tags":[]}},{"pickle":{"id":"38e893f4-0288-4ba2-b48f-763d0b2e38d2","uri":"src\/examples\/features\/putDeleteMultipartUploads.feature","astNodeIds":["68708d8c-c24a-492e-84a4-d00ad7b19e4d","58adb060-4905-4ea7-9f51-212dd5b10d80"],"name":"I run the k6 script for load testing with DELETE requests","language":"en","steps":[{"id":"dadd8ace-ce7b-45ff-a29d-3b390730d569","text":"I have a k6 script for DELETE testing","type":"Context","astNodeIds":["3d35e5a5-515b-4fb0-8f89-648a1645ecfb","58adb060-4905-4ea7-9f51-212dd5b10d80"]},{"id":"584ef690-802d-4c5a-a861-bfda410f7587","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"}]},{"cells":[{"value":"20"},{"value":"3"}]}]}},"astNodeIds":["3260f5d4-9798-492d-bbcd-19f7cab153de","58adb060-4905-4ea7-9f51-212dd5b10d80"]},{"id":"fd05d637-6059-443e-bd75-772b7b8bff9d","text":"the following endpoint is used: \"\/api\/v1\/delete-record\"","type":"Action","astNodeIds":["e220c90f-d98b-4b7f-b4a9-09c5fe1b2083","58adb060-4905-4ea7-9f51-212dd5b10d80"]},{"id":"1569d849-dda7-4c77-b9a7-5184efdfc315","text":"the authentication type is \"api_key\"","type":"Action","astNodeIds":["0cdb6d73-240d-4318-acc1-25df3db3f269","58adb060-4905-4ea7-9f51-212dd5b10d80"]},{"id":"324829dc-8951-45f5-b6e6-96bb0d8296cc","text":"the API should handle the DELETE request successfully","type":"Outcome","astNodeIds":["a449b633-ea88-4937-8d86-37146fecf8f3","58adb060-4905-4ea7-9f51-212dd5b10d80"]}],"tags":[]}},{"pickle":{"id":"71f2fa01-6a04-4aee-8a9d-87e03d4736d5","uri":"src\/examples\/features\/putDeleteMultipartUploads.feature","astNodeIds":["ca32e1c9-a1f6-4dc3-b0cd-16ae77320bc8","9a0bb57b-8c91-4c6e-a390-812267412cfa"],"name":"I run the k6 script for load testing with multipart\/form-data requests","language":"en","steps":[{"id":"52315f39-471f-47fc-a416-3d9f90a9014f","text":"I have a k6 script for multipart POST testing","type":"Context","astNodeIds":["2ddfde2c-8018-4ebb-a94b-0319d4c1bf88","9a0bb57b-8c91-4c6e-a390-812267412cfa"]},{"id":"12b68f88-fce8-4b6f-aa7d-bfa286cc9f05","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"}]},{"cells":[{"value":"15"},{"value":"5"}]}]}},"astNodeIds":["a234fd4d-b673-4625-af06-01ba7232bc80","9a0bb57b-8c91-4c6e-a390-812267412cfa"]},{"id":"328be0c9-5d7a-4f77-a1fa-80252ca18926","text":"the following endpoint is used: \"\/api\/v1\/upload-file\"","type":"Action","astNodeIds":["164e5b31-7548-42aa-a870-52a328b58b8c","9a0bb57b-8c91-4c6e-a390-812267412cfa"]},{"id":"5b838c66-4f2a-4c8c-9062-19e336a039b4","text":"the following multipart body is used:","type":"Action","argument":{"docString":{"content":"file: <sample.pdf>\ndescription: {{file_description}}"}},"astNodeIds":["2a8a0e8d-d676-41db-8387-6424a1ec9ab0","9a0bb57b-8c91-4c6e-a390-812267412cfa"]},{"id":"d458d81d-7aa5-4cf9-a747-d3fab31adefe","text":"the authentication type is \"bearer_token\"","type":"Action","astNodeIds":["82876da4-8abf-4650-a399-eb9524bd46a0","9a0bb57b-8c91-4c6e-a390-812267412cfa"]},{"id":"04c751ca-377c-466a-ac46-82f88e85620e","text":"the API should handle multipart request successfully","type":"Outcome","astNodeIds":["49c58b51-8ab1-4c57-8090-fe6a5c143dce","9a0bb57b-8c91-4c6e-a390-812267412cfa"]}],"tags":[]}},{"source":{"data":"Feature: Run stress tests with dynamic GET and POST body from environment variables and JSON files\n\n Scenario Outline: I run the k6 script for stress testing with dynamic POST body from environment variables and JSON files\n Given I have a k6 script for POST testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration | http_req_failed | http_req_duration | error_rate |\n | <virtual_users> | <duration> | <http_req_failed> | <http_req_duration> | <error_rate> |\n And the following endpoint(s) is\/are used:\n \"\"\"\n \/api\/v1\/resource1\n https:\/\/api.external.com\/resource2\n \"\"\"\n And the following POST body is used:\n \"\"\"\n {\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n }\n \"\"\"\n Then the API should handle the POST request successfully\n\n Examples:\n\n Scenario Outline: I run the k6 script for GET testing with dynamic endpoints\n Given I have a k6 script for GET testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration | http_req_failed | http_req_duration | error_rate |\n | <virtual_users> | <duration> | <http_req_failed> | <http_req_duration> | <error_rate> |\n And the following endpoint(s) is\/are used:\n \"\"\"\n \/api\/v1\/resource1\n https:\/\/api.external.com\/resource2\n \"\"\"\n Then the API should handle the GET request successfully\n\n Examples:\n | virtual_users | duration | http_req_failed |\n | 10 | 5 | rate<0.10 |\n | 50 | 10 | rate<0.05 |\n | 100 | 15 | rate<0.10 |\n | 200 | 20 | rate<0.05 |\n\n Scenario Outline: I run the k6 script for PUT requests\n Given I have a k6 script for PUT testing\n When I run the k6 script with the following configurations:\n | virtual_users | duration | http_req_failed | http_req_duration |\n | <virtual_users> | <duration> | <http_req_failed> | <http_req_duration> |\n And the following endpoint(s) is\/are used:\n \"\"\"\n \/api\/v1\/update-profile\n \"\"\"\n When the following PUT body is used for \"<endpoint>\"\n \"\"\"\n {\n \"id\": \"{{userId}}\",\n \"status\": \"updated\"\n }\n \"\"\"\n And the authentication type is \"bearer_token\"\n Then the API should handle the PUT request successfully\n\n Examples:\n | virtual_users | duration | http_req_failed | http_req_duration |\n | 20 | 10 | rate<0.05 | p(95)<1000 |\n","uri":"src\/examples\/features\/streesTestTemplate.feature","mediaType":"text\/x.cucumber.gherkin+plain"}},{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Run stress tests with dynamic GET and POST body from environment variables and JSON files","description":"","children":[{"scenario":{"id":"7a503983-a539-44a4-aaf4-c9f9384361a9","tags":[],"location":{"line":3,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for stress testing with dynamic POST body from environment variables and JSON files","description":"","steps":[{"id":"a605ce67-ff55-41e1-bad5-a0c10c96b2e6","location":{"line":4,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for POST testing"},{"id":"ab164f05-c384-42d3-9dab-c4323839bd65","location":{"line":5,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":6,"column":7},"rows":[{"id":"dd0404ec-baf5-4621-a664-9d7570556f73","location":{"line":6,"column":7},"cells":[{"location":{"line":6,"column":9},"value":"virtual_users"},{"location":{"line":6,"column":27},"value":"duration"},{"location":{"line":6,"column":40},"value":"http_req_failed"},{"location":{"line":6,"column":60},"value":"http_req_duration"},{"location":{"line":6,"column":82},"value":"error_rate"}]},{"id":"a414759d-462a-4f46-98e1-bf3d2659767a","location":{"line":7,"column":7},"cells":[{"location":{"line":7,"column":9},"value":"<virtual_users>"},{"location":{"line":7,"column":27},"value":"<duration>"},{"location":{"line":7,"column":40},"value":"<http_req_failed>"},{"location":{"line":7,"column":60},"value":"<http_req_duration>"},{"location":{"line":7,"column":82},"value":"<error_rate>"}]}]}},{"id":"5e49c154-8b13-4fb4-bc65-5b5889f417aa","location":{"line":8,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint(s) is\/are used:","docString":{"location":{"line":9,"column":7},"content":"\/api\/v1\/resource1\nhttps:\/\/api.external.com\/resource2","delimiter":"\"\"\""}},{"id":"be96622b-b354-4677-b39a-afd510587820","location":{"line":13,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following POST body is used:","docString":{"location":{"line":14,"column":7},"content":"{\n \"username\": \"{{username}}\",\n \"email\": \"{{email}}\",\n \"address\": \"<address.json>\"\n}","delimiter":"\"\"\""}},{"id":"d9f853d5-1245-4cfa-a936-dc5c0bcf2f69","location":{"line":21,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the POST request successfully"}],"examples":[{"id":"335144ef-1838-4045-b13d-39dbc7c6a929","tags":[],"location":{"line":23,"column":5},"keyword":"Examples","name":"","description":"","tableBody":[]}]}},{"scenario":{"id":"01e80ae3-40b5-4838-aa3f-6dcd09aba1c6","tags":[],"location":{"line":25,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for GET testing with dynamic endpoints","description":"","steps":[{"id":"d34367cf-91fb-438a-9e31-9eeafd84bdcb","location":{"line":26,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for GET testing"},{"id":"981e435a-ea18-4b1c-9f4c-1fb384da9bfa","location":{"line":27,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":28,"column":7},"rows":[{"id":"1aee6d1d-c44d-4631-b704-c908ece52cc6","location":{"line":28,"column":7},"cells":[{"location":{"line":28,"column":9},"value":"virtual_users"},{"location":{"line":28,"column":27},"value":"duration"},{"location":{"line":28,"column":40},"value":"http_req_failed"},{"location":{"line":28,"column":60},"value":"http_req_duration"},{"location":{"line":28,"column":82},"value":"error_rate"}]},{"id":"ab14aeca-44c7-487c-888c-4bb85754e2fb","location":{"line":29,"column":7},"cells":[{"location":{"line":29,"column":9},"value":"<virtual_users>"},{"location":{"line":29,"column":27},"value":"<duration>"},{"location":{"line":29,"column":40},"value":"<http_req_failed>"},{"location":{"line":29,"column":60},"value":"<http_req_duration>"},{"location":{"line":29,"column":82},"value":"<error_rate>"}]}]}},{"id":"8579ba96-8a54-4b3d-a1b6-2736f6885c11","location":{"line":30,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint(s) is\/are used:","docString":{"location":{"line":31,"column":7},"content":"\/api\/v1\/resource1\nhttps:\/\/api.external.com\/resource2","delimiter":"\"\"\""}},{"id":"19045c9d-5153-4509-bb39-936e00de2142","location":{"line":35,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the GET request successfully"}],"examples":[{"id":"ae211ff4-7425-4715-995e-b19a79e37b40","tags":[],"location":{"line":37,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"0398f113-40df-4a66-857f-1d8cd3c78b21","location":{"line":38,"column":7},"cells":[{"location":{"line":38,"column":9},"value":"virtual_users"},{"location":{"line":38,"column":25},"value":"duration"},{"location":{"line":38,"column":36},"value":"http_req_failed"}]},"tableBody":[{"id":"76bcf55e-0d13-4d10-adc1-650f509b85c5","location":{"line":39,"column":7},"cells":[{"location":{"line":39,"column":20},"value":"10"},{"location":{"line":39,"column":32},"value":"5"},{"location":{"line":39,"column":36},"value":"rate<0.10"}]},{"id":"3fd18d2a-f6af-49af-a221-fb49c6a7010d","location":{"line":40,"column":7},"cells":[{"location":{"line":40,"column":20},"value":"50"},{"location":{"line":40,"column":31},"value":"10"},{"location":{"line":40,"column":36},"value":"rate<0.05"}]},{"id":"260da53b-94ac-482f-a757-fd34b0457b6b","location":{"line":41,"column":7},"cells":[{"location":{"line":41,"column":19},"value":"100"},{"location":{"line":41,"column":31},"value":"15"},{"location":{"line":41,"column":36},"value":"rate<0.10"}]},{"id":"298533a8-b13f-462e-b0ae-dad13026457c","location":{"line":42,"column":7},"cells":[{"location":{"line":42,"column":19},"value":"200"},{"location":{"line":42,"column":31},"value":"20"},{"location":{"line":42,"column":36},"value":"rate<0.05"}]}]}]}},{"scenario":{"id":"4beda27a-aefe-4e56-852c-56c50d57142d","tags":[],"location":{"line":44,"column":3},"keyword":"Scenario Outline","name":"I run the k6 script for PUT requests","description":"","steps":[{"id":"35eb34b6-f20c-4dd7-87b5-a8c9508fa2d9","location":{"line":45,"column":5},"keyword":"Given ","keywordType":"Context","text":"I have a k6 script for PUT testing"},{"id":"1f11a9d9-4452-4496-86f3-ecb5ed611a85","location":{"line":46,"column":5},"keyword":"When ","keywordType":"Action","text":"I run the k6 script with the following configurations:","dataTable":{"location":{"line":47,"column":7},"rows":[{"id":"997c5174-8248-46a1-858a-7597752c0260","location":{"line":47,"column":7},"cells":[{"location":{"line":47,"column":9},"value":"virtual_users"},{"location":{"line":47,"column":27},"value":"duration"},{"location":{"line":47,"column":40},"value":"http_req_failed"},{"location":{"line":47,"column":60},"value":"http_req_duration"}]},{"id":"ab7136f1-9e60-44c8-adf7-767f4710aa1f","location":{"line":48,"column":7},"cells":[{"location":{"line":48,"column":9},"value":"<virtual_users>"},{"location":{"line":48,"column":27},"value":"<duration>"},{"location":{"line":48,"column":40},"value":"<http_req_failed>"},{"location":{"line":48,"column":60},"value":"<http_req_duration>"}]}]}},{"id":"dc4a0336-7323-44d3-8c3d-ad07a4707700","location":{"line":49,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the following endpoint(s) is\/are used:","docString":{"location":{"line":50,"column":7},"content":"\/api\/v1\/update-profile","delimiter":"\"\"\""}},{"id":"4b0688b9-378b-46b1-8f98-a10c3217b7f3","location":{"line":53,"column":5},"keyword":"When ","keywordType":"Action","text":"the following PUT body is used for \"<endpoint>\"","docString":{"location":{"line":54,"column":7},"content":"{\n \"id\": \"{{userId}}\",\n \"status\": \"updated\"\n}","delimiter":"\"\"\""}},{"id":"d7e8dd46-cc78-4411-8e71-f3db308fb029","location":{"line":60,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"the authentication type is \"bearer_token\""},{"id":"6cfde4f3-d550-42b5-a042-c54d5c40b3a7","location":{"line":61,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"the API should handle the PUT request successfully"}],"examples":[{"id":"220e9031-0af4-4c96-915e-536576a270db","tags":[],"location":{"line":63,"column":5},"keyword":"Examples","name":"","description":"","tableHeader":{"id":"688850c1-2411-4a18-84cc-e5beab303971","location":{"line":64,"column":7},"cells":[{"location":{"line":64,"column":9},"value":"virtual_users"},{"location":{"line":64,"column":25},"value":"duration"},{"location":{"line":64,"column":36},"value":"http_req_failed"},{"location":{"line":64,"column":54},"value":"http_req_duration"}]},"tableBody":[{"id":"44a7730b-a39b-4842-9202-e62f75397e79","location":{"line":65,"column":7},"cells":[{"location":{"line":65,"column":20},"value":"20"},{"location":{"line":65,"column":31},"value":"10"},{"location":{"line":65,"column":36},"value":"rate<0.05"},{"location":{"line":65,"column":54},"value":"p(95)<1000"}]}]}]}}]},"comments":[],"uri":"src\/examples\/features\/streesTestTemplate.feature"}},{"pickle":{"id":"4d9e3d38-e5e6-4d1f-84dd-abc227817116","uri":"src\/examples\/features\/streesTestTemplate.feature","astNodeIds":["01e80ae3-40b5-4838-aa3f-6dcd09aba1c6","76bcf55e-0d13-4d10-adc1-650f509b85c5"],"name":"I run the k6 script for GET testing with dynamic endpoints","language":"en","steps":[{"id":"1a83be2e-85ba-480d-b5bd-0f835bec9744","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["d34367cf-91fb-438a-9e31-9eeafd84bdcb","76bcf55e-0d13-4d10-adc1-650f509b85c5"]},{"id":"07459a4f-21ef-4839-9c6d-1283a64f5553","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"10"},{"value":"5"},{"value":"rate<0.10"},{"value":"<http_req_duration>"},{"value":"<error_rate>"}]}]}},"astNodeIds":["981e435a-ea18-4b1c-9f4c-1fb384da9bfa","76bcf55e-0d13-4d10-adc1-650f509b85c5"]},{"id":"53c1968a-248a-4c9d-95e3-38ead3443a6e","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/v1\/resource1\nhttps:\/\/api.external.com\/resource2"}},"astNodeIds":["8579ba96-8a54-4b3d-a1b6-2736f6885c11","76bcf55e-0d13-4d10-adc1-650f509b85c5"]},{"id":"a045f530-ebcf-492a-a52a-b4c0e1d9ad5b","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["19045c9d-5153-4509-bb39-936e00de2142","76bcf55e-0d13-4d10-adc1-650f509b85c5"]}],"tags":[]}},{"pickle":{"id":"8dbe99ab-b031-4e70-843d-6e8643712eb7","uri":"src\/examples\/features\/streesTestTemplate.feature","astNodeIds":["01e80ae3-40b5-4838-aa3f-6dcd09aba1c6","3fd18d2a-f6af-49af-a221-fb49c6a7010d"],"name":"I run the k6 script for GET testing with dynamic endpoints","language":"en","steps":[{"id":"5ded4775-cc23-4601-9237-e376fb646e08","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["d34367cf-91fb-438a-9e31-9eeafd84bdcb","3fd18d2a-f6af-49af-a221-fb49c6a7010d"]},{"id":"693b07d2-b5f8-4e4f-ae12-ee65c42ddc01","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"50"},{"value":"10"},{"value":"rate<0.05"},{"value":"<http_req_duration>"},{"value":"<error_rate>"}]}]}},"astNodeIds":["981e435a-ea18-4b1c-9f4c-1fb384da9bfa","3fd18d2a-f6af-49af-a221-fb49c6a7010d"]},{"id":"1082c179-1d4e-44ec-912f-2d97374b7b7c","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/v1\/resource1\nhttps:\/\/api.external.com\/resource2"}},"astNodeIds":["8579ba96-8a54-4b3d-a1b6-2736f6885c11","3fd18d2a-f6af-49af-a221-fb49c6a7010d"]},{"id":"5f3ca616-cdb2-4aa7-bb1c-ec2889223334","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["19045c9d-5153-4509-bb39-936e00de2142","3fd18d2a-f6af-49af-a221-fb49c6a7010d"]}],"tags":[]}},{"pickle":{"id":"33f653dd-9f2a-408b-9386-303d852f37ad","uri":"src\/examples\/features\/streesTestTemplate.feature","astNodeIds":["01e80ae3-40b5-4838-aa3f-6dcd09aba1c6","260da53b-94ac-482f-a757-fd34b0457b6b"],"name":"I run the k6 script for GET testing with dynamic endpoints","language":"en","steps":[{"id":"35484a4f-1848-46c5-a412-439afbd46a84","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["d34367cf-91fb-438a-9e31-9eeafd84bdcb","260da53b-94ac-482f-a757-fd34b0457b6b"]},{"id":"02c088d8-668a-4dff-9cf3-309dc39604ea","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"100"},{"value":"15"},{"value":"rate<0.10"},{"value":"<http_req_duration>"},{"value":"<error_rate>"}]}]}},"astNodeIds":["981e435a-ea18-4b1c-9f4c-1fb384da9bfa","260da53b-94ac-482f-a757-fd34b0457b6b"]},{"id":"05873521-1795-477e-a4e1-2b4ab698f3f6","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/v1\/resource1\nhttps:\/\/api.external.com\/resource2"}},"astNodeIds":["8579ba96-8a54-4b3d-a1b6-2736f6885c11","260da53b-94ac-482f-a757-fd34b0457b6b"]},{"id":"d5ec08b0-5484-4cbe-990c-99e15fd945f8","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["19045c9d-5153-4509-bb39-936e00de2142","260da53b-94ac-482f-a757-fd34b0457b6b"]}],"tags":[]}},{"pickle":{"id":"b88059bb-b18a-4f67-866f-bde73239652c","uri":"src\/examples\/features\/streesTestTemplate.feature","astNodeIds":["01e80ae3-40b5-4838-aa3f-6dcd09aba1c6","298533a8-b13f-462e-b0ae-dad13026457c"],"name":"I run the k6 script for GET testing with dynamic endpoints","language":"en","steps":[{"id":"e6c54218-605d-46c2-b9af-993b767722e1","text":"I have a k6 script for GET testing","type":"Context","astNodeIds":["d34367cf-91fb-438a-9e31-9eeafd84bdcb","298533a8-b13f-462e-b0ae-dad13026457c"]},{"id":"7b71b18e-7184-49f2-99f5-7da7ecb52036","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"},{"value":"error_rate"}]},{"cells":[{"value":"200"},{"value":"20"},{"value":"rate<0.05"},{"value":"<http_req_duration>"},{"value":"<error_rate>"}]}]}},"astNodeIds":["981e435a-ea18-4b1c-9f4c-1fb384da9bfa","298533a8-b13f-462e-b0ae-dad13026457c"]},{"id":"9bfe29af-c899-4a5c-a5f6-26a510127d7a","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/v1\/resource1\nhttps:\/\/api.external.com\/resource2"}},"astNodeIds":["8579ba96-8a54-4b3d-a1b6-2736f6885c11","298533a8-b13f-462e-b0ae-dad13026457c"]},{"id":"fbca06e4-1203-4756-8a9d-52286fd0dffc","text":"the API should handle the GET request successfully","type":"Outcome","astNodeIds":["19045c9d-5153-4509-bb39-936e00de2142","298533a8-b13f-462e-b0ae-dad13026457c"]}],"tags":[]}},{"pickle":{"id":"f3dd35da-1cf6-4ace-a2a9-859087d168db","uri":"src\/examples\/features\/streesTestTemplate.feature","astNodeIds":["4beda27a-aefe-4e56-852c-56c50d57142d","44a7730b-a39b-4842-9202-e62f75397e79"],"name":"I run the k6 script for PUT requests","language":"en","steps":[{"id":"781c1216-be4e-44f9-8642-b2ac77f81b69","text":"I have a k6 script for PUT testing","type":"Context","astNodeIds":["35eb34b6-f20c-4dd7-87b5-a8c9508fa2d9","44a7730b-a39b-4842-9202-e62f75397e79"]},{"id":"71d89c27-9840-467c-9d29-de3b6216f44d","text":"I run the k6 script with the following configurations:","type":"Action","argument":{"dataTable":{"rows":[{"cells":[{"value":"virtual_users"},{"value":"duration"},{"value":"http_req_failed"},{"value":"http_req_duration"}]},{"cells":[{"value":"20"},{"value":"10"},{"value":"rate<0.05"},{"value":"p(95)<1000"}]}]}},"astNodeIds":["1f11a9d9-4452-4496-86f3-ecb5ed611a85","44a7730b-a39b-4842-9202-e62f75397e79"]},{"id":"46da01ef-de56-4368-a53f-1f346c616277","text":"the following endpoint(s) is\/are used:","type":"Action","argument":{"docString":{"content":"\/api\/v1\/update-profile"}},"astNodeIds":["dc4a0336-7323-44d3-8c3d-ad07a4707700","44a7730b-a39b-4842-9202-e62f75397e79"]},{"id":"4ac8b62b-3554-42ee-b52b-c775c55a2f4d","text":"the following PUT body is used for \"<endpoint>\"","type":"Action","argument":{"docString":{"content":"{\n \"id\": \"{{userId}}\",\n \"status\": \"updated\"\n}"}},"astNodeIds":["4b0688b9-378b-46b1-8f98-a10c3217b7f3","44a7730b-a39b-4842-9202-e62f75397e79"]},{"id":"f52b3a33-f946-4e88-9222-96717ca44f64","text":"the authentication type is \"bearer_token\"","type":"Action","astNodeIds":["d7e8dd46-cc78-4411-8e71-f3db308fb029","44a7730b-a39b-4842-9202-e62f75397e79"]},{"id":"00b23b56-7df3-4c45-82a8-606cf07e25b8","text":"the API should handle the PUT request successfully","type":"Outcome","astNodeIds":["6cfde4f3-d550-42b5-a042-c54d5c40b3a7","44a7730b-a39b-4842-9202-e62f75397e79"]}],"tags":[]}},{"stepDefinition":{"id":"250fbb95-e969-4e05-8c42-6ff7b605e257","pattern":{"source":"I have a k6 script for {word} testing","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":21}}}},{"stepDefinition":{"id":"f5b26f19-db5a-4f45-b297-0f7fa5fe17de","pattern":{"source":"I run the k6 script with the following configurations:","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":25}}}},{"stepDefinition":{"id":"61e43a9b-2b06-445c-a6bc-dce99259b59b","pattern":{"source":"the request headers are:","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":71}}}},{"stepDefinition":{"id":"10fb1bf4-0a2d-4fb5-a397-d08df5e9df6d","pattern":{"source":"the following endpoint\\(s) is\\\/are used:","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":83}}}},{"stepDefinition":{"id":"c55bfe82-02fb-4761-9cbe-1cbe06c93788","pattern":{"source":"the following {word} body is used for {string}","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":90}}}},{"stepDefinition":{"id":"b3cece1e-1e31-4a18-aaed-6a90d3270986","pattern":{"source":"the authentication type is {string}","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":99}}}},{"stepDefinition":{"id":"98d8b813-b8fe-4090-9e82-07c0884576da","pattern":{"source":"the API should handle the {word} request successfully","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"uri":"step_definitions\/load_test_steps.js","location":{"line":134}}}},{"testRunStarted":{"id":"0f946c9f-5fb7-49f2-9b6e-39ffcd09c0b0","timestamp":{"seconds":1745677271,"nanos":86000000}}},{"testCase":{"testRunStartedId":"0f946c9f-5fb7-49f2-9b6e-39ffcd09c0b0","pickleId":"18f832eb-1243-4451-a04f-1c355f49727c","id":"84afc703-59c7-49b4-a636-c7238bdf0a34","testSteps":[{"id":"6538589d-dee1-4f93-a48c-1466544d8238","pickleStepId":"fbc08113-de9f-4830-bd47-5f8a086f545b","stepDefinitionIds":["250fbb95-e969-4e05-8c42-6ff7b605e257"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":23,"value":"GET","children":[]},"parameterTypeName":"word"}]}]},{"id":"8b88d895-32fc-4aa1-98af-50cae37658b7","pickleStepId":"cd251d6b-47b8-4d90-a7ab-b0aa1db45af4","stepDefinitionIds":["f5b26f19-db5a-4f45-b297-0f7fa5fe17de"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"c2e3d3d7-5957-405c-a1ab-f51c71853660","pickleStepId":"59f9f14d-c7f1-4e02-a5f2-f164725c30ee","stepDefinitionIds":["10fb1bf4-0a2d-4fb5-a397-d08df5e9df6d"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"5374bf4d-e1e1-493d-95ba-ec56fde81c93","pickleStepId":"c46923fa-5426-4275-92a9-fcca1d75c4fa","stepDefinitionIds":["b3cece1e-1e31-4a18-aaed-6a90d3270986"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":27,"value":"\"none\"","children":[{"start":28,"value":"none","children":[{"children":[]}]},{"children":[{"children":[]}]}]},"parameterTypeName":"string"}]}]},{"id":"e52d7749-d082-472f-ad84-3fcd3e6ce5d9","pickleStepId":"c3602baa-5015-429d-9523-4800e20c9329","stepDefinitionIds":["98d8b813-b8fe-4090-9e82-07c0884576da"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":26,"value":"GET","children":[]},"parameterTypeName":"word"}]}]}]}},{"testCase":{"testRunStartedId":"0f946c9f-5fb7-49f2-9b6e-39ffcd09c0b0","pickleId":"b1052f7b-4642-4a8b-9ef1-5093b0d95b25","id":"cb8fe454-8615-4bfa-8db7-8e647c0c14f0","testSteps":[{"id":"7377e735-199d-4907-89c2-5a3812628ae7","pickleStepId":"0c73c22a-cf30-42f5-86b0-02f3ec0785ea","stepDefinitionIds":["250fbb95-e969-4e05-8c42-6ff7b605e257"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":23,"value":"GET","children":[]},"parameterTypeName":"word"}]}]},{"id":"003803cd-cb31-4ad5-b82b-2702548a3891","pickleStepId":"42f45a79-71a1-4d33-8336-795a1cf1a553","stepDefinitionIds":["f5b26f19-db5a-4f45-b297-0f7fa5fe17de"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"8c5f979c-acf7-4f27-a467-f8b0fe8d1781","pickleStepId":"6a068a5e-cde3-4c1e-a6aa-d914c61d17b2","stepDefinitionIds":["10fb1bf4-0a2d-4fb5-a397-d08df5e9df6d"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"0658fbf0-1778-484c-9640-924a12e333f0","pickleStepId":"0c4e10ed-1ec9-4c05-9c3d-4f99e1c5702c","stepDefinitionIds":["b3cece1e-1e31-4a18-aaed-6a90d3270986"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":27,"value":"\"none\"","children":[{"start":28,"value":"none","children":[{"children":[]}]},{"children":[{"children":[]}]}]},"parameterTypeName":"string"}]}]},{"id":"692d832d-973c-41e9-a5f0-602a3bf6fb25","pickleStepId":"e069cbb8-d45d-4bc0-a783-cb67356e37fa","stepDefinitionIds":["98d8b813-b8fe-4090-9e82-07c0884576da"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":26,"value":"GET","children":[]},"parameterTypeName":"word"}]}]}]}},{"testCase":{"testRunStartedId":"0f946c9f-5fb7-49f2-9b6e-39ffcd09c0b0","pickleId":"becd51ba-3712-499f-a258-825a9e484a6d","id":"b20518b7-855d-4db0-b5f8-8c7e8c2ab06a","testSteps":[{"id":"c8781da2-2df1-4b10-8956-99aac2d6568c","pickleStepId":"1fb0e17c-ea1b-4add-97b3-54a7a2ce2072","stepDefinitionIds":["250fbb95-e969-4e05-8c42-6ff7b605e257"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":23,"value":"GET","children":[]},"parameterTypeName":"word"}]}]},{"id":"c2f0665a-69bc-4f1b-8b8b-35064a78a45e","pickleStepId":"e07b39b9-737f-4687-b05a-005ea2ce37de","stepDefinitionIds":["f5b26f19-db5a-4f45-b297-0f7fa5fe17de"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"f4e429d7-0dcb-4326-bbf1-69632f6773cd","pickleStepId":"5d9e6f8c-49a4-412b-a0b8-aea729fabd96","stepDefinitionIds":["10fb1bf4-0a2d-4fb5-a397-d08df5e9df6d"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"0e5b8a5e-2453-41c5-8332-341d3deaa76e","pickleStepId":"d03acf3e-9a8f-4bfe-a02b-b5249687fb7b","stepDefinitionIds":["b3cece1e-1e31-4a18-aaed-6a90d3270986"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":27,"value":"\"none\"","children":[{"start":28,"value":"none","children":[{"children":[]}]},{"children":[{"children":[]}]}]},"parameterTypeName":"string"}]}]},{"id":"8d0fd241-1299-4bcd-b232-aee42833a0ab","pickleStepId":"6ca7200a-d0b8-43a9-bc72-33c94d0a833f","stepDefinitionIds":["98d8b813-b8fe-4090-9e82-07c0884576da"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":26,"value":"GET","children":[]},"parameterTypeName":"word"}]}]}]}},{"testCase":{"testRunStartedId":"0f946c9f-5fb7-49f2-9b6e-39ffcd09c0b0","pickleId":"cd52722e-6cb5-4e63-870a-8c07204c5cb7","id":"0394920e-d28c-4b3d-bb3a-0a3de6266aa1","testSteps":[{"id":"30128344-64ef-4c6d-914d-7a5ede18c6d6","pickleStepId":"3fe6aa27-06c4-4fcd-901b-9ca8caa47cc1","stepDefinitionIds":["250fbb95-e969-4e05-8c42-6ff7b605e257"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":23,"value":"GET","children":[]},"parameterTypeName":"word"}]}]},{"id":"6ffb27f5-9237-4ca9-bb7d-5156fccece1f","pickleStepId":"bf85c136-f871-4d9a-b556-1be70e0e68e5","stepDefinitionIds":["f5b26f19-db5a-4f45-b297-0f7fa5fe17de"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"581ca029-614b-4cda-bef1-056df13a7885","pickleStepId":"18b73c37-c275-48d2-b19c-f8aedbc3cbe7","stepDefinitionIds":["10fb1bf4-0a2d-4fb5-a397-d08df5e9df6d"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"984bc71b-fc07-42a5-bf8d-705b9f8f784b","pickleStepId":"31e475a8-3e24-4a7d-8282-b7a1154bb5c2","stepDefinitionIds":["b3cece1e-1e31-4a18-aaed-6a90d3270986"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":27,"value":"\"none\"","children":[{"start":28,"value":"none","children":[{"children":[]}]},{"children":[{"children":[]}]}]},"parameterTypeName":"string"}]}]},{"id":"0b5976e4-976f-40ef-9b1f-9bb487c8eed5","pickleStepId":"652ff689-5213-4845-be71-08c49d66d8fc","stepDefinitionIds":["98d8b813-b8fe-4090-9e82-07c0884576da"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":26,"value":"GET","children":[]},"parameterTypeName":"word"}]}]}]}},{"testCaseStarted":{"attempt":0,"testCaseId":"84afc703-59c7-49b4-a636-c7238bdf0a34","id":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","timestamp":{"seconds":1745677271,"nanos":94000000}}},{"testStepStarted":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"6538589d-dee1-4f93-a48c-1466544d8238","timestamp":{"seconds":1745677271,"nanos":94000000}}},{"testStepFinished":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"6538589d-dee1-4f93-a48c-1466544d8238","testStepResult":{"duration":{"seconds":0,"nanos":542124},"status":"PASSED"},"timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepStarted":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"8b88d895-32fc-4aa1-98af-50cae37658b7","timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepFinished":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"8b88d895-32fc-4aa1-98af-50cae37658b7","testStepResult":{"duration":{"seconds":0,"nanos":252499},"status":"PASSED"},"timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepStarted":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"c2e3d3d7-5957-405c-a1ab-f51c71853660","timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepFinished":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"c2e3d3d7-5957-405c-a1ab-f51c71853660","testStepResult":{"duration":{"seconds":0,"nanos":61167},"status":"PASSED"},"timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepStarted":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"5374bf4d-e1e1-493d-95ba-ec56fde81c93","timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepFinished":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"5374bf4d-e1e1-493d-95ba-ec56fde81c93","testStepResult":{"duration":{"seconds":0,"nanos":87333},"status":"PASSED"},"timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepStarted":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"e52d7749-d082-472f-ad84-3fcd3e6ce5d9","timestamp":{"seconds":1745677271,"nanos":95000000}}},{"testStepFinished":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","testStepId":"e52d7749-d082-472f-ad84-3fcd3e6ce5d9","testStepResult":{"duration":{"seconds":13,"nanos":21277000},"status":"FAILED","message":"Error: k6 test execution failed\n at CustomWorld.<anonymous> (\/Users\/paschal\/personal\/k6-cucumber-steps\/step_definitions\/load_test_steps.js:154:13)\n at processTicksAndRejections (node:internal\/process\/task_queues:105:5)","exception":{"type":"Error","message":"k6 test execution failed","stackTrace":" at CustomWorld.<anonymous> (\/Users\/paschal\/personal\/k6-cucumber-steps\/step_definitions\/load_test_steps.js:154:13)\n at processTicksAndRejections (node:internal\/process\/task_queues:105:5)"}},"timestamp":{"seconds":1745677284,"nanos":131000000}}},{"testCaseFinished":{"testCaseStartedId":"632cd4c7-38c7-4e2c-aace-88eb2b8b4ce2","timestamp":{"seconds":1745677284,"nanos":131000000},"willBeRetried":false}},{"testCaseStarted":{"attempt":0,"testCaseId":"cb8fe454-8615-4bfa-8db7-8e647c0c14f0","id":"16c2346a-2767-468f-ba55-cb5993b02182","timestamp":{"seconds":1745677284,"nanos":131000000}}},{"testStepStarted":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"7377e735-199d-4907-89c2-5a3812628ae7","timestamp":{"seconds":1745677284,"nanos":131000000}}},{"testStepFinished":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"7377e735-199d-4907-89c2-5a3812628ae7","testStepResult":{"duration":{"seconds":0,"nanos":120666},"status":"PASSED"},"timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepStarted":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"003803cd-cb31-4ad5-b82b-2702548a3891","timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepFinished":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"003803cd-cb31-4ad5-b82b-2702548a3891","testStepResult":{"duration":{"seconds":0,"nanos":75207},"status":"PASSED"},"timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepStarted":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"8c5f979c-acf7-4f27-a467-f8b0fe8d1781","timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepFinished":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"8c5f979c-acf7-4f27-a467-f8b0fe8d1781","testStepResult":{"duration":{"seconds":0,"nanos":44750},"status":"PASSED"},"timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepStarted":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"0658fbf0-1778-484c-9640-924a12e333f0","timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepFinished":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"0658fbf0-1778-484c-9640-924a12e333f0","testStepResult":{"duration":{"seconds":0,"nanos":173041},"status":"PASSED"},"timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepStarted":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"692d832d-973c-41e9-a5f0-602a3bf6fb25","timestamp":{"seconds":1745677284,"nanos":132000000}}},{"testStepFinished":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","testStepId":"692d832d-973c-41e9-a5f0-602a3bf6fb25","testStepResult":{"duration":{"seconds":16,"nanos":189515208},"status":"FAILED","message":"Error: k6 test execution failed\n at CustomWorld.<anonymous> (\/Users\/paschal\/personal\/k6-cucumber-steps\/step_definitions\/load_test_steps.js:154:13)\n at processTicksAndRejections (node:internal\/process\/task_queues:105:5)","exception":{"type":"Error","message":"k6 test execution failed","stackTrace":" at CustomWorld.<anonymous> (\/Users\/paschal\/personal\/k6-cucumber-steps\/step_definitions\/load_test_steps.js:154:13)\n at processTicksAndRejections (node:internal\/process\/task_queues:105:5)"}},"timestamp":{"seconds":1745677300,"nanos":322000000}}},{"testCaseFinished":{"testCaseStartedId":"16c2346a-2767-468f-ba55-cb5993b02182","timestamp":{"seconds":1745677300,"nanos":322000000},"willBeRetried":false}},{"testCaseStarted":{"attempt":0,"testCaseId":"b20518b7-855d-4db0-b5f8-8c7e8c2ab06a","id":"561212bd-88d7-4418-a0da-a5a4de1c2f13","timestamp":{"seconds":1745677300,"nanos":322000000}}},{"testStepStarted":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"c8781da2-2df1-4b10-8956-99aac2d6568c","timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepFinished":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"c8781da2-2df1-4b10-8956-99aac2d6568c","testStepResult":{"duration":{"seconds":0,"nanos":189416},"status":"PASSED"},"timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepStarted":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"c2f0665a-69bc-4f1b-8b8b-35064a78a45e","timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepFinished":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"c2f0665a-69bc-4f1b-8b8b-35064a78a45e","testStepResult":{"duration":{"seconds":0,"nanos":314374},"status":"PASSED"},"timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepStarted":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"f4e429d7-0dcb-4326-bbf1-69632f6773cd","timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepFinished":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"f4e429d7-0dcb-4326-bbf1-69632f6773cd","testStepResult":{"duration":{"seconds":0,"nanos":34167},"status":"PASSED"},"timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepStarted":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"0e5b8a5e-2453-41c5-8332-341d3deaa76e","timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepFinished":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"0e5b8a5e-2453-41c5-8332-341d3deaa76e","testStepResult":{"duration":{"seconds":0,"nanos":154875},"status":"PASSED"},"timestamp":{"seconds":1745677300,"nanos":323000000}}},{"testStepStarted":{"testCaseStartedId":"561212bd-88d7-4418-a0da-a5a4de1c2f13","testStepId":"8d0fd241-1299-4bcd-b232-aee42833a0ab","timestamp":{"seconds":1745677300,"nanos":323000000}}}
@@ -1,231 +0,0 @@
1
- [
2
- {
3
- "description": "",
4
- "elements": [
5
- {
6
- "description": "",
7
- "id": "run-load-tests-with-dynamic-get-and-post-body-from-environment-variables-and-json-files;i-run-the-k6-script-for-load-testing-with-dynamic-get-requests",
8
- "keyword": "Scenario Outline",
9
- "line": 47,
10
- "name": "I run the k6 script for load testing with dynamic GET requests",
11
- "steps": [
12
- {
13
- "arguments": [],
14
- "keyword": "Given ",
15
- "line": 33,
16
- "name": "I have a k6 script for GET testing",
17
- "match": {
18
- "location": "step_definitions/load_test_steps.js:19"
19
- },
20
- "result": {
21
- "status": "passed",
22
- "duration": 554916
23
- }
24
- },
25
- {
26
- "arguments": [
27
- {
28
- "rows": [
29
- {
30
- "cells": [
31
- "virtual_users",
32
- "duration",
33
- "http_req_failed",
34
- "http_req_duration",
35
- "error_rate"
36
- ]
37
- },
38
- {
39
- "cells": [
40
- "10",
41
- "5",
42
- "rate<0.05",
43
- "p(95)<3000",
44
- "<error_rate>"
45
- ]
46
- }
47
- ]
48
- }
49
- ],
50
- "keyword": "When ",
51
- "line": 34,
52
- "name": "I run the k6 script with the following configurations:",
53
- "match": {
54
- "location": "step_definitions/load_test_steps.js:23"
55
- },
56
- "result": {
57
- "status": "passed",
58
- "duration": 260375
59
- }
60
- },
61
- {
62
- "arguments": [
63
- {
64
- "content": "/api/profile\nhttps://reqres.in/api/users?page=2",
65
- "line": 38
66
- }
67
- ],
68
- "keyword": "And ",
69
- "line": 37,
70
- "name": "the following endpoint(s) is/are used:",
71
- "match": {
72
- "location": "step_definitions/load_test_steps.js:81"
73
- },
74
- "result": {
75
- "status": "passed",
76
- "duration": 54791
77
- }
78
- },
79
- {
80
- "arguments": [],
81
- "keyword": "When ",
82
- "line": 42,
83
- "name": "the authentication type is \"none\"",
84
- "match": {
85
- "location": "step_definitions/load_test_steps.js:97"
86
- },
87
- "result": {
88
- "status": "passed",
89
- "duration": 87500
90
- }
91
- },
92
- {
93
- "arguments": [],
94
- "keyword": "Then ",
95
- "line": 43,
96
- "name": "the API should handle the GET request successfully",
97
- "match": {
98
- "location": "step_definitions/load_test_steps.js:101"
99
- },
100
- "result": {
101
- "status": "passed",
102
- "duration": 6265906541
103
- }
104
- }
105
- ],
106
- "tags": [
107
- {
108
- "name": "@loadTest",
109
- "line": 31
110
- }
111
- ],
112
- "type": "scenario"
113
- },
114
- {
115
- "description": "",
116
- "id": "run-load-tests-with-dynamic-get-and-post-body-from-environment-variables-and-json-files;i-run-the-k6-script-for-load-testing-with-dynamic-get-requests",
117
- "keyword": "Scenario Outline",
118
- "line": 48,
119
- "name": "I run the k6 script for load testing with dynamic GET requests",
120
- "steps": [
121
- {
122
- "arguments": [],
123
- "keyword": "Given ",
124
- "line": 33,
125
- "name": "I have a k6 script for GET testing",
126
- "match": {
127
- "location": "step_definitions/load_test_steps.js:19"
128
- },
129
- "result": {
130
- "status": "passed",
131
- "duration": 150082
132
- }
133
- },
134
- {
135
- "arguments": [
136
- {
137
- "rows": [
138
- {
139
- "cells": [
140
- "virtual_users",
141
- "duration",
142
- "http_req_failed",
143
- "http_req_duration",
144
- "error_rate"
145
- ]
146
- },
147
- {
148
- "cells": [
149
- "50",
150
- "10",
151
- "rate<0.05",
152
- "p(95)<3000",
153
- "<error_rate>"
154
- ]
155
- }
156
- ]
157
- }
158
- ],
159
- "keyword": "When ",
160
- "line": 34,
161
- "name": "I run the k6 script with the following configurations:",
162
- "match": {
163
- "location": "step_definitions/load_test_steps.js:23"
164
- },
165
- "result": {
166
- "status": "passed",
167
- "duration": 139750
168
- }
169
- },
170
- {
171
- "arguments": [
172
- {
173
- "content": "/api/profile\nhttps://reqres.in/api/users?page=2",
174
- "line": 38
175
- }
176
- ],
177
- "keyword": "And ",
178
- "line": 37,
179
- "name": "the following endpoint(s) is/are used:",
180
- "match": {
181
- "location": "step_definitions/load_test_steps.js:81"
182
- },
183
- "result": {
184
- "status": "passed",
185
- "duration": 88915
186
- }
187
- },
188
- {
189
- "arguments": [],
190
- "keyword": "When ",
191
- "line": 42,
192
- "name": "the authentication type is \"none\"",
193
- "match": {
194
- "location": "step_definitions/load_test_steps.js:97"
195
- },
196
- "result": {
197
- "status": "passed",
198
- "duration": 260624
199
- }
200
- },
201
- {
202
- "arguments": [],
203
- "keyword": "Then ",
204
- "line": 43,
205
- "name": "the API should handle the GET request successfully",
206
- "match": {
207
- "location": "step_definitions/load_test_steps.js:101"
208
- },
209
- "result": {
210
- "status": "passed",
211
- "duration": 11848230500
212
- }
213
- }
214
- ],
215
- "tags": [
216
- {
217
- "name": "@loadTest",
218
- "line": 31
219
- }
220
- ],
221
- "type": "scenario"
222
- }
223
- ],
224
- "id": "run-load-tests-with-dynamic-get-and-post-body-from-environment-variables-and-json-files",
225
- "line": 1,
226
- "keyword": "Feature",
227
- "name": "Run load tests with dynamic GET and POST body from environment variables and JSON files",
228
- "tags": [],
229
- "uri": "src/examples/features/loadTestTemplate.feature"
230
- }
231
- ]
@@ -1,3 +1,5 @@
1
+ // load_test_steps.js
2
+
1
3
  const { Given, When, Then } = require("@cucumber/cucumber");
2
4
  const fs = require("fs");
3
5
  const path = require("path");
@@ -98,33 +100,59 @@ When("the authentication type is {string}", function (authType) {
98
100
  this.config.headers = generateHeaders(authType, process.env);
99
101
  });
100
102
 
103
+ // Then(
104
+ // "the API should handle the {word} request successfully",
105
+ // { timeout: 60000 }, // Increase timeout to 60 seconds
106
+ // async function (method) {
107
+ // // Normalize both values to uppercase for comparison
108
+ // const expectedMethod = method.toUpperCase();
109
+ // const actualMethod = this.config.method.toUpperCase();
110
+
111
+ // if (actualMethod !== expectedMethod) {
112
+ // throw new Error(
113
+ // `Mismatched HTTP method: expected "${expectedMethod}", got "${actualMethod}"`
114
+ // );
115
+ // }
116
+
117
+ // try {
118
+ // // Generate the k6 script content
119
+ // const scriptContent = buildK6Script(this.config);
120
+
121
+ // // Generate the temporary k6 script file
122
+ // const scriptPath = generateK6Script(scriptContent);
123
+
124
+ // // Run the k6 script and capture the output
125
+ // const stdout = await runK6Script(scriptPath);
126
+ // } catch (error) {
127
+ // console.error("k6 execution failed:", error.message);
128
+ // console.error("k6 stderr:", error.stderr); // Log stderr for debugging
129
+ // throw new Error("k6 test execution failed");
130
+ // }
131
+ // }
132
+ // );
133
+
101
134
  Then(
102
135
  "the API should handle the {word} request successfully",
103
- { timeout: 60000 }, // Increase timeout to 60 seconds
136
+ { timeout: 60000 },
104
137
  async function (method) {
105
- // Normalize both values to uppercase for comparison
138
+ if (!this.config || !this.config.method) {
139
+ throw new Error("Configuration is missing or incomplete.");
140
+ }
106
141
  const expectedMethod = method.toUpperCase();
107
142
  const actualMethod = this.config.method.toUpperCase();
108
-
109
143
  if (actualMethod !== expectedMethod) {
110
144
  throw new Error(
111
145
  `Mismatched HTTP method: expected "${expectedMethod}", got "${actualMethod}"`
112
146
  );
113
147
  }
114
-
115
148
  try {
116
- // Generate the k6 script content
117
149
  const scriptContent = buildK6Script(this.config);
118
-
119
- // Generate the temporary k6 script file
120
150
  const scriptPath = generateK6Script(scriptContent);
121
-
122
- // Run the k6 script and capture the output
123
151
  const stdout = await runK6Script(scriptPath);
124
152
  } catch (error) {
125
153
  console.error("k6 execution failed:", error.message);
126
- console.error("k6 stderr:", error.stderr); // Log stderr for debugging
127
154
  throw new Error("k6 test execution failed");
128
155
  }
156
+ console.log("Final configuration before k6 execution:", this.config);
129
157
  }
130
158
  );
@@ -0,0 +1,44 @@
1
+
2
+ import http from 'k6/http';
3
+ import { check } from 'k6';
4
+
5
+ export const options = {
6
+ "vus": 100,
7
+ "duration": "15s",
8
+ "thresholds": {
9
+ "http_req_failed": [
10
+ "rate<0.05"
11
+ ],
12
+ "http_req_duration": [
13
+ "p(95)<3500"
14
+ ]
15
+ }
16
+ };
17
+
18
+ export default function () {
19
+
20
+ const resolvedUrl0 = "https://grafana.com/api/profile";
21
+ const res0 = http.request("GET", resolvedUrl0, null, {
22
+ headers: {
23
+ "Content-Type": "application/json"
24
+ }
25
+ });
26
+ console.log(`Response Body for ${resolvedUrl0}: ${res0.body}`);
27
+ check(res0, {
28
+ "status is 2xx": (r) => r.status >= 200 && r.status < 300
29
+ });
30
+
31
+
32
+ const resolvedUrl1 = "https://reqres.in/api/users?page=2";
33
+ const res1 = http.request("GET", resolvedUrl1, null, {
34
+ headers: {
35
+ "Content-Type": "application/json"
36
+ }
37
+ });
38
+ console.log(`Response Body for ${resolvedUrl1}: ${res1.body}`);
39
+ check(res1, {
40
+ "status is 2xx": (r) => r.status >= 200 && r.status < 300
41
+ });
42
+
43
+ }
44
+