k6-cucumber-steps 1.0.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.
Files changed (74) hide show
  1. package/.env +17 -0
  2. package/.env.example +17 -0
  3. package/.github/workflows/k6-load-test.yml +35 -0
  4. package/.vscode/extensions.json +5 -0
  5. package/.vscode/settings.json +10 -0
  6. package/LICENSE +21 -0
  7. package/README.md +179 -0
  8. package/assets/k6-cucumber-report.png +0 -0
  9. package/assets/paschal logo (2).png +0 -0
  10. package/cucumber.js +26 -0
  11. package/generateReport.js +24 -0
  12. package/libs/helpers/buildK6Script.js +94 -0
  13. package/libs/helpers/generateHeaders.js +29 -0
  14. package/libs/helpers/resolveBody.js +55 -0
  15. package/libs/utils/k6Runner.js +71 -0
  16. package/package.json +60 -0
  17. package/reports/load-results.json +231 -0
  18. package/reports/report.html +1234 -0
  19. package/step_definitions/load_test_steps.js +130 -0
  20. package/step_definitions/world.js +13 -0
  21. package/temp/k6_script.js +27 -0
  22. package/tmp/k6_script_01d24b4b-b76e-45b1-a457-9668fb82d33a.js +32 -0
  23. package/tmp/k6_script_1438a7b8-37a7-4556-8da9-12e588e666da.js +32 -0
  24. package/tmp/k6_script_15971355-7bba-45c2-85a8-81899162beab.js +32 -0
  25. package/tmp/k6_script_32f4609f-8abb-4d48-9454-321bd66409eb.js +32 -0
  26. package/tmp/k6_script_42cd4c8b-dee1-4b23-997b-ca1b0b8aae34.js +32 -0
  27. package/tmp/k6_script_49e30b01-9631-4b7f-a2e9-f538bfdade19.js +31 -0
  28. package/tmp/k6_script_4c01eb2e-b7d2-4597-a146-a6990dd92853.js +32 -0
  29. package/tmp/k6_script_4d779cfb-0c34-472c-b5fe-85ceb25f2422.js +31 -0
  30. package/tmp/k6_script_4f00954e-7f02-4c0c-8a89-df8183266fac.js +32 -0
  31. package/tmp/k6_script_4f166411-c40b-44a9-9561-94ab8d4c97bd.js +32 -0
  32. package/tmp/k6_script_4fba8ca6-c90f-467e-bc49-15f30a8eae81.js +32 -0
  33. package/tmp/k6_script_5054b6db-ae03-453e-ad29-8b79869c17b7.js +32 -0
  34. package/tmp/k6_script_5d64d2e5-7cde-4313-969c-ca14c9178bff.js +32 -0
  35. package/tmp/k6_script_61db2aea-6187-4b51-b450-67f773c8050c.js +32 -0
  36. package/tmp/k6_script_6b6147df-69a8-4ed3-9479-0edd8a3e64cd.js +32 -0
  37. package/tmp/k6_script_6dda7a7d-dd36-4775-87f5-d0365715ae2b.js +32 -0
  38. package/tmp/k6_script_6fca496e-f9d3-47e6-b214-8b998b69e9c8.js +32 -0
  39. package/tmp/k6_script_7ca87434-af5c-4ecc-9a7e-0ce7ae5c05c3.js +32 -0
  40. package/tmp/k6_script_7ff302b6-5bfd-440d-a7e4-bf60cf3ec23b.js +31 -0
  41. package/tmp/k6_script_817f7c24-46a8-4c8e-8c8b-7d63ae8c90f9.js +32 -0
  42. package/tmp/k6_script_88b6b615-94b7-4af4-a05b-40439f73c38a.js +32 -0
  43. package/tmp/k6_script_8a9b2d06-fdf9-408b-98e6-4228e039f66b.js +32 -0
  44. package/tmp/k6_script_93acfc41-ce38-4363-8394-faf4568c62a7.js +33 -0
  45. package/tmp/k6_script_9424816a-7712-400d-80b1-235cf298b102.js +32 -0
  46. package/tmp/k6_script_a8ddb599-632f-4a05-9d6f-b99c93e7533f.js +32 -0
  47. package/tmp/k6_script_a9b18f14-bf36-4423-a706-1e132ff3cfda.js +32 -0
  48. package/tmp/k6_script_a9eb065f-d0b9-42b8-b4fa-90d9c67787a4.js +32 -0
  49. package/tmp/k6_script_aac9cc10-b5cd-4fd6-9ba7-ad37b55a5e0c.js +32 -0
  50. package/tmp/k6_script_ac7f2225-f35b-4330-aa95-ea7468d652ed.js +32 -0
  51. package/tmp/k6_script_acb5057c-60cc-47b3-b8aa-718912587694.js +32 -0
  52. package/tmp/k6_script_aecaaf81-a2e9-4342-a90b-3077eba3fdbe.js +32 -0
  53. package/tmp/k6_script_b054781a-fbe3-41ab-8a55-52c7923bb4e3.js +32 -0
  54. package/tmp/k6_script_b210e574-c636-4b1a-9245-f9d9ce9ba731.js +32 -0
  55. package/tmp/k6_script_b4abecc0-91a9-4dc4-8e40-480a31b7954e.js +32 -0
  56. package/tmp/k6_script_b5a61631-afe3-47c4-af92-40213c3afe1a.js +32 -0
  57. package/tmp/k6_script_b6c1de34-edde-4e1d-be3f-504147837617.js +32 -0
  58. package/tmp/k6_script_be52dc14-7325-4ba0-ba2c-125c1dffab0c.js +42 -0
  59. package/tmp/k6_script_c2dbe965-703c-4c8d-83f0-db2eb73b1ab3.js +32 -0
  60. package/tmp/k6_script_c2ecca4f-7a01-4560-9fe0-4a5184497482.js +33 -0
  61. package/tmp/k6_script_cd13c408-4d59-490a-b788-f2e69ab5aeac.js +32 -0
  62. package/tmp/k6_script_cde84f7c-9d97-4c51-a315-005af6463f40.js +33 -0
  63. package/tmp/k6_script_cfbf49b0-d50a-4e00-b0ee-c1f37ae101bc.js +32 -0
  64. package/tmp/k6_script_d0599a1d-7fe5-4a58-b1f7-571a9c586732.js +32 -0
  65. package/tmp/k6_script_d1cd0a14-dc18-4034-a859-cd8b30da7c68.js +32 -0
  66. package/tmp/k6_script_d2365925-9612-48b5-87e9-4ecd81212133.js +32 -0
  67. package/tmp/k6_script_d38531f2-a437-4117-a4d3-076a11f7dfa6.js +32 -0
  68. package/tmp/k6_script_d415abc5-41b3-4445-a8bf-9c13c3208c59.js +32 -0
  69. package/tmp/k6_script_d9a6e7f4-5b88-4fcf-90d8-0183a1b96608.js +32 -0
  70. package/tmp/k6_script_e70b4a0a-1d52-431c-92e1-a53fd6739dfc.js +32 -0
  71. package/tmp/k6_script_e7bc2c96-7603-468b-b4be-d609d3c2f6ce.js +32 -0
  72. package/tmp/k6_script_e9687b8a-7885-48e5-91ad-9dcd21acc401.js +32 -0
  73. package/tmp/k6_script_ee2c199b-643d-4a78-b8df-7319e02783c1.js +32 -0
  74. package/tmp/k6_script_fe495d2f-7943-4151-a7fe-004ad443083d.js +32 -0
@@ -0,0 +1,231 @@
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
+ ]