k6-cucumber-steps 2.0.9 โ†’ 2.0.10-alpha.0

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.
package/README.md CHANGED
@@ -1,18 +1,21 @@
1
- # k6-cucumber-steps ๐Ÿฅ’๐Ÿงช
1
+ # k6-cucumber-steps ๐Ÿฅ’๐Ÿงช - K6 Performance Testing with Cucumber BDD
2
+
3
+ **k6-cucumber-steps** is a powerful CLI tool that enables you to run [k6](https://k6.io/) performance and load tests using [Cucumber](https://cucumber.io/) BDD (Behavior-Driven Development) syntax. Write performance tests in natural language Gherkin and execute them at scale with k6.
2
4
 
3
5
  <table align="center" style="margin-bottom:30px;"><tr><td align="center" width="9999" heigth="9999" >
4
- <img src="assets/paschal logo (2).png" alt="paschal Logo" style="margin-top:25px;" align="center"/>
6
+ <img src="assets/paschal logo (2).png" alt="k6-cucumber-steps logo" style="margin-top:25px;" align="center"/>
5
7
  </td></tr></table>
6
8
 
7
9
  [![npm version](https://img.shields.io/npm/v/k6-cucumber-steps.svg)](https://www.npmjs.com/package/k6-cucumber-steps)
8
10
  [![npm downloads](https://img.shields.io/npm/dt/k6-cucumber-steps.svg)](https://www.npmjs.com/package/k6-cucumber-steps)
11
+ [![npm downloads](https://img.shields.io/npm/dm/k6-cucumber-steps.svg)](https://www.npmjs.com/package/k6-cucumber-steps)
9
12
  [![license](https://img.shields.io/npm/l/k6-cucumber-steps)](https://github.com/qaPaschalE/k6-cucumber-steps/blob/main/LICENSE)
10
13
  [![Cucumber](https://img.shields.io/badge/built%20with-Cucumber-3178c6.svg)](https://cucumber.io/)
11
14
  [![Node.js](https://img.shields.io/badge/node-%3E=18-green.svg)](https://nodejs.org/)
15
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
12
16
  [![Sponsor](https://img.shields.io/github/sponsors/qaPaschalE?style=social)](https://github.com/sponsors/qaPaschalE)
13
- [![Build Status](https://github.com/qaPaschalE/k6-cucumber-steps/actions/workflows/k6-load-test.yml/badge.svg)](https://github.com/aPaschalE/k6-cucumber-steps/actions/workflows/k6-load-test.yml)
14
-
15
- Run [k6](https://k6.io/) performance/load tests using [Cucumber](https://cucumber.io/) BDD syntax with ease.
17
+ [![Build Status](https://github.com/qaPaschalE/k6-cucumber-steps/actions/workflows/k6-load-test.yml/badge.svg)](https://github.com/qaPaschalE/k6-cucumber-steps/actions/workflows/k6-load-test.yml)
18
+ [![Documentation](https://img.shields.io/badge/docs-TypeDoc-blue)](https://qapaschale.github.io/k6-cucumber-steps/)
16
19
 
17
20
  ---
18
21
 
@@ -179,6 +182,30 @@ npx k6-cucumber-steps generate -f ./features
179
182
 
180
183
  **Excluded directories:** `node_modules/`, hidden directories (`.git/`, `.github/`, etc.)
181
184
 
185
+ ### ๐Ÿ—‘๏ธ DELETE Request Support (NEW!)
186
+
187
+ Full DELETE request support with environment variables and alias replacement:
188
+
189
+ ```gherkin
190
+ # Basic DELETE
191
+ When I k6 make a DELETE request to "/users/1"
192
+
193
+ # DELETE with env vars
194
+ When I k6 make a DELETE request to "/users/{{USER_ID}}"
195
+
196
+ # DELETE with custom headers
197
+ When I k6 make a DELETE request to "/api/items/1" with headers:
198
+ | Authorization |
199
+ | Bearer {{authToken}} |
200
+
201
+ # DELETE with payload file
202
+ When I k6 make a DELETE request to "/api/bulk" with payload from "data/delete-payload.json"
203
+ ```
204
+
205
+ **Supports:**
206
+ - `{{VARIABLE_NAME}}` for environment variables
207
+ - `{{alias:NAME}}` for stored aliases in payload files
208
+
182
209
  ### ๐Ÿ“ Multiple Feature Paths
183
210
 
184
211
  Specify **multiple directories or files** using comma-separated paths.
@@ -307,6 +334,25 @@ The `init` command creates a clean, industry-standard directory structure:
307
334
 
308
335
  ## ๐Ÿ› ๏ธ CLI Reference
309
336
 
337
+ #### Enable Autocomplete in VSCode
338
+
339
+ For autocomplete to work in your feature files:
340
+
341
+ 1. **Install the Cucumber extension**: [Cucumber (Gherkin) Full Support](https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete)
342
+
343
+ 2. **Create `.vscode/settings.json`** in your project root:
344
+ ```json
345
+ {
346
+ "cucumber.features": ["features/**/*.feature"],
347
+ "cucumber.stepDefinitions": ["steps/**/*.ts", "steps/**/*.js"],
348
+ "cucumber.autocomplete.snippets": true
349
+ }
350
+ ```
351
+
352
+ 3. **Reload VSCode** - Autocomplete will show all 69 step definitions!
353
+
354
+ ๐Ÿ“– **Full setup guide:** [VSCode Autocomplete Setup](VSCODE_AUTOCOMPLETE_SETUP.md)
355
+
310
356
  #### Options
311
357
 
312
358
  The `npx k6-cucumber-steps` command accepts the following options:
@@ -557,8 +603,19 @@ Scenario: Store and reuse values
557
603
  # Debug: print stored values
558
604
  And I k6 print alias "authToken"
559
605
  And I k6 print all aliases
606
+
607
+ # Write alias to JSON file (NEW!)
608
+ And I k6 write "authToken" to "data/tokens.json"
609
+ And I k6 write "userId" to "data/user.json" as "id"
560
610
  ```
561
611
 
612
+ **Write to File Features:**
613
+ - โœ… Creates file if it doesn't exist
614
+ - โœ… Creates directory structure if needed
615
+ - โœ… Supports custom key names with `as`
616
+ - โœ… Adds timestamp to written data
617
+ - โœ… Reads from stored aliases only
618
+
562
619
  ### Response Assertion Steps
563
620
 
564
621
  ```gherkin
@@ -591,6 +648,7 @@ When I k6 make a GET request to "/users/1" with headers:
591
648
 
592
649
  # POST requests
593
650
  When I k6 make a POST request to "/users"
651
+ When I k6 make a POST request to "/users" with payload from "payload.json"
594
652
 
595
653
  # PUT requests
596
654
  When I k6 make a PUT request to "/users/1"
@@ -599,6 +657,13 @@ When I k6 make a PUT request to "/users/1" with body:
599
657
  # PATCH requests
600
658
  When I k6 make a PATCH request to "/settings"
601
659
  When I k6 make a PATCH request to "/settings" with body:
660
+
661
+ # DELETE requests (NEW!)
662
+ When I k6 make a DELETE request to "/users/1"
663
+ When I k6 make a DELETE request to "/users/{{USER_ID}}" with headers:
664
+ | Authorization |
665
+ | Bearer {{authToken}} |
666
+ When I k6 make a DELETE request to "/api/items/1" with payload from "data/delete-payload.json"
602
667
  ```
603
668
 
604
669
  ### Sample Features
@@ -1 +1 @@
1
- {"version":3,"file":"sample-steps.generator.d.ts","sourceRoot":"","sources":["../../../src/generators/samples/sample-steps.generator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,qBAAa,oBAAoB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI;IAgBzD,OAAO,CAAC,uBAAuB;CAwoChC"}
1
+ {"version":3,"file":"sample-steps.generator.d.ts","sourceRoot":"","sources":["../../../src/generators/samples/sample-steps.generator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,qBAAa,oBAAoB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI;IAgBzD,OAAO,CAAC,uBAAuB;CAgyChC"}
@@ -262,6 +262,96 @@ export function k6IStoreIn(jsonPath: any, fileName: any) {
262
262
  console.log(\` Aliases available: \${alias}, \${fileName}\`);
263
263
  }
264
264
 
265
+ /**
266
+ * And I k6 write "aliasName" to "data/file.json"
267
+ * Writes an alias value to a JSON file. Creates the file if it doesn't exist.
268
+ */
269
+ export function k6IWriteTo(aliasName: string, fileName: string) {
270
+ const fs = require('fs');
271
+ const path = require('path');
272
+
273
+ // Get the alias value
274
+ const value = globalThis.storedAliases?.[aliasName];
275
+
276
+ if (value === undefined) {
277
+ console.error(\`โŒ Alias "\${aliasName}" not found. Available aliases:\`, globalThis.storedAliases ? Object.keys(globalThis.storedAliases) : 'none');
278
+ return;
279
+ }
280
+
281
+ // Resolve file path
282
+ let filePath = fileName;
283
+ if (!path.isAbsolute(fileName)) {
284
+ filePath = path.join(process.cwd(), fileName);
285
+ }
286
+
287
+ // Ensure directory exists
288
+ const dir = path.dirname(filePath);
289
+ if (!fs.existsSync(dir)) {
290
+ fs.mkdirSync(dir, { recursive: true });
291
+ console.log(\`๐Ÿ“ Created directory: \${dir}\`);
292
+ }
293
+
294
+ // Prepare data to write
295
+ let dataToWrite;
296
+
297
+ // If value is already an object/array, use it directly
298
+ if (typeof value === 'object') {
299
+ dataToWrite = value;
300
+ } else {
301
+ // If it's a primitive, wrap it in an object with the alias name as key
302
+ dataToWrite = {
303
+ [aliasName]: value,
304
+ writtenAt: new Date().toISOString()
305
+ };
306
+ }
307
+
308
+ // Write to file
309
+ fs.writeFileSync(filePath, JSON.stringify(dataToWrite, null, 2));
310
+ console.log(\`โœ… Wrote alias "\${aliasName}" to \${filePath}\`);
311
+ console.log(\` Value: \${typeof value === 'string' && value.length > 20 ? value.substring(0, 20) + '...' : JSON.stringify(value)}\`);
312
+ }
313
+
314
+ /**
315
+ * And I k6 write "aliasName" to "data/file.json" as "customKey"
316
+ * Writes an alias value to a JSON file with a custom key name.
317
+ */
318
+ export function k6IWriteToAs(aliasName: string, fileName: string, customKey: string) {
319
+ const fs = require('fs');
320
+ const path = require('path');
321
+
322
+ // Get the alias value
323
+ const value = globalThis.storedAliases?.[aliasName];
324
+
325
+ if (value === undefined) {
326
+ console.error(\`โŒ Alias "\${aliasName}" not found. Available aliases:\`, globalThis.storedAliases ? Object.keys(globalThis.storedAliases) : 'none');
327
+ return;
328
+ }
329
+
330
+ // Resolve file path
331
+ let filePath = fileName;
332
+ if (!path.isAbsolute(fileName)) {
333
+ filePath = path.join(process.cwd(), fileName);
334
+ }
335
+
336
+ // Ensure directory exists
337
+ const dir = path.dirname(filePath);
338
+ if (!fs.existsSync(dir)) {
339
+ fs.mkdirSync(dir, { recursive: true });
340
+ console.log(\`๐Ÿ“ Created directory: \${dir}\`);
341
+ }
342
+
343
+ // Prepare data with custom key
344
+ const dataToWrite = {
345
+ [customKey]: value,
346
+ writtenAt: new Date().toISOString()
347
+ };
348
+
349
+ // Write to file
350
+ fs.writeFileSync(filePath, JSON.stringify(dataToWrite, null, 2));
351
+ console.log(\`โœ… Wrote alias "\${aliasName}" as "\${customKey}" to \${filePath}\`);
352
+ console.log(\` Value: \${typeof value === 'string' && value.length > 20 ? value.substring(0, 20) + '...' : JSON.stringify(value)}\`);
353
+ }
354
+
265
355
  export function k6IAmAuthenticatedAsA(userType: any) {
266
356
  const token = globalThis.savedTokens?.[\`data/\${userType}.json\`] ||
267
357
  globalThis.savedTokens?.[userType];
@@ -526,6 +616,68 @@ export function k6IMakeAPatchRequestToWithBody(endpoint: string, bodyData: any)
526
616
  globalThis.lastResponse = response;
527
617
  }
528
618
 
619
+ /**
620
+ * Makes a DELETE request to the specified endpoint.
621
+ * Supports {{VARIABLE_NAME}} for env vars in endpoint.
622
+ */
623
+ export function k6IMakeADeleteRequestTo(endpoint: string) {
624
+ const resolvedEndpoint = replaceEnvVariables(endpoint);
625
+ const url = \`\${baseUrl}\${resolvedEndpoint}\`;
626
+ const response = http.del(url, null, { headers: defaultHeaders });
627
+ globalThis.lastResponse = response;
628
+ }
629
+
630
+ /**
631
+ * Makes a DELETE request with custom headers.
632
+ * Supports {{VARIABLE_NAME}} for env vars in endpoint.
633
+ */
634
+ export function k6IMakeADeleteRequestToWithHeaders(endpoint: string, headersTable: any) {
635
+ const resolvedEndpoint = replaceEnvVariables(endpoint);
636
+ const url = \`\${baseUrl}\${resolvedEndpoint}\`;
637
+ let requestHeaders = { ...defaultHeaders };
638
+ if (headersTable?.length > 0) {
639
+ Object.assign(requestHeaders, headersTable[0]);
640
+ }
641
+ const response = http.del(url, null, { headers: requestHeaders });
642
+ globalThis.lastResponse = response;
643
+ }
644
+
645
+ /**
646
+ * Makes a DELETE request using a payload.json file.
647
+ * Supports {{VARIABLE_NAME}} for env vars and {{alias:NAME}} for stored aliases.
648
+ */
649
+ export function k6IMakeADeleteRequestToWithPayloadFile(endpoint: string, fileName: string) {
650
+ const fs = require('fs');
651
+ const path = require('path');
652
+
653
+ // Resolve payload file path
654
+ let filePath = fileName;
655
+ if (!path.isAbsolute(fileName)) {
656
+ if (fs.existsSync(path.join(process.cwd(), 'data', fileName))) {
657
+ filePath = path.join(process.cwd(), 'data', fileName);
658
+ } else if (fs.existsSync(path.join(process.cwd(), fileName))) {
659
+ filePath = path.join(process.cwd(), fileName);
660
+ } else {
661
+ filePath = path.join(process.cwd(), 'payload.json');
662
+ }
663
+ }
664
+
665
+ if (!fs.existsSync(filePath)) {
666
+ console.error(\`โŒ Payload file not found: \${filePath}\`);
667
+ return;
668
+ }
669
+
670
+ let payloadContent = fs.readFileSync(filePath, 'utf8');
671
+ payloadContent = replaceEnvVariables(payloadContent);
672
+ payloadContent = replaceAliasVariables(payloadContent);
673
+
674
+ const resolvedEndpoint = replaceEnvVariables(endpoint);
675
+ const url = \`\${baseUrl}\${resolvedEndpoint}\`;
676
+ const response = http.del(url, payloadContent, { headers: defaultHeaders });
677
+ globalThis.lastResponse = response;
678
+ console.log(\`๐Ÿ—‘๏ธ DELETE \${url} with payload from \${filePath}\`);
679
+ }
680
+
529
681
  export function k6TheResponsePropertyShouldBe(propertyPath: string, expectedValue: string) {
530
682
  const res = globalThis.lastResponse;
531
683
  if (!res) {
@@ -1 +1 @@
1
- {"version":3,"file":"sample-steps.generator.js","sourceRoot":"","sources":["../../../src/generators/samples/sample-steps.generator.ts"],"names":[],"mappings":";;;;;;AAAA,mDAAmD;AACnD,4CAAoB;AACpB,gDAAwB;AAExB,yEAAoE;AAEpE,MAAa,oBAAoB;IAC/B,QAAQ,CAAC,UAAkB,EAAE,MAAqB;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC;QACtC,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAE3C,MAAM,WAAW,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAEvD,YAAE,CAAC,aAAa,CACd,cAAI,CAAC,IAAI,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6xCV,CAAC;IACA,CAAC;CACF;AAjzCD,oDAizCC"}
@@ -39,6 +39,27 @@
39
39
  "fileName: string"
40
40
  ]
41
41
  },
42
+ {
43
+ "step": "I k6 write {string} to {string}",
44
+ "functionName": "k6IWriteTo",
45
+ "description": "Writes an alias value to a JSON file (creates file if not exists)",
46
+ "category": "Storage",
47
+ "parameters": [
48
+ "aliasName: string",
49
+ "fileName: string"
50
+ ]
51
+ },
52
+ {
53
+ "step": "I k6 write {string} to {string} as {string}",
54
+ "functionName": "k6IWriteToAs",
55
+ "description": "Writes an alias value to a JSON file with custom key name",
56
+ "category": "Storage",
57
+ "parameters": [
58
+ "aliasName: string",
59
+ "fileName: string",
60
+ "customKey: string"
61
+ ]
62
+ },
42
63
  {
43
64
  "step": "I k6 store response {string} as {string}",
44
65
  "functionName": "k6IStoreResponseAs",
@@ -178,6 +199,35 @@
178
199
  "fileName: string"
179
200
  ]
180
201
  },
202
+ {
203
+ "step": "I k6 make a DELETE request to {string}",
204
+ "functionName": "k6IMakeADeleteRequestTo",
205
+ "description": "Makes a DELETE request to the specified endpoint (supports {{VARIABLE_NAME}})",
206
+ "category": "HTTP",
207
+ "parameters": [
208
+ "endpoint: string"
209
+ ]
210
+ },
211
+ {
212
+ "step": "I k6 make a DELETE request to {string} with headers:",
213
+ "functionName": "k6IMakeADeleteRequestToWithHeaders",
214
+ "description": "Makes a DELETE request with custom headers (supports {{VARIABLE_NAME}})",
215
+ "category": "HTTP",
216
+ "parameters": [
217
+ "endpoint: string",
218
+ "headersTable: any"
219
+ ]
220
+ },
221
+ {
222
+ "step": "I k6 make a DELETE request to {string} with payload from {string}",
223
+ "functionName": "k6IMakeADeleteRequestToWithPayloadFile",
224
+ "description": "Makes a DELETE request using a payload.json file (supports {{VARIABLE_NAME}} and {{alias:NAME}})",
225
+ "category": "HTTP",
226
+ "parameters": [
227
+ "endpoint: string",
228
+ "fileName: string"
229
+ ]
230
+ },
181
231
  {
182
232
  "step": "the k6 response status should be {string}",
183
233
  "functionName": "k6TheResponseStatusShouldBe",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k6-cucumber-steps",
3
- "version": "2.0.9",
3
+ "version": "2.0.10-alpha.0",
4
4
  "description": "Generate k6 test scripts from Cucumber feature files",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -30,13 +30,24 @@
30
30
  "homepage": "https://github.com/qaPaschalE/k6-cucumber-steps#readme",
31
31
  "keywords": [
32
32
  "k6",
33
+ "k6 testing",
34
+ "k6-cucumber-steps",
33
35
  "cucumber",
36
+ "cucumber-js",
34
37
  "gherkin",
35
- "testing",
36
- "k6-cucumber-steps",
37
- "performance",
38
- "automation",
39
- "bdd"
38
+ "bdd",
39
+ "behavior-driven development",
40
+ "performance testing",
41
+ "load testing",
42
+ "stress testing",
43
+ "api testing",
44
+ "browser testing",
45
+ "test automation",
46
+ "k6 browser",
47
+ "k6 load testing",
48
+ "performance automation",
49
+ "typescript testing",
50
+ "javascript testing"
40
51
  ],
41
52
  "author": "Enyimiri Chetachi Paschal (qaPaschalE)",
42
53
  "license": "MIT",