k6-cucumber-steps 1.0.33 → 1.0.34
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/.vscode/extensions.json +3 -0
- package/.vscode/settings.json +12 -0
- package/README.md +12 -10
- package/package.json +17 -19
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cucumber.features": [
|
|
3
|
+
"src/features/*.feature",
|
|
4
|
+
"src/features/**/*.feature",
|
|
5
|
+
"src/features/**/*.k6.feature",
|
|
6
|
+
"src/features/template/*.feature"
|
|
7
|
+
],
|
|
8
|
+
"cucumber.glue": [
|
|
9
|
+
"step_definitions/*.js",
|
|
10
|
+
"src/features/stepDefinitions/*.js"
|
|
11
|
+
]
|
|
12
|
+
}
|
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ Here's a step-by-step guide to using `k6-cucumber-steps` in your project:
|
|
|
122
122
|
"json:reports/load-report.json", // For JSON report
|
|
123
123
|
"html:reports/report.html", // For HTML report
|
|
124
124
|
],
|
|
125
|
+
paths: ["./features/*.feature"],
|
|
125
126
|
tags: process.env.TAGS,
|
|
126
127
|
overwrite: false, // Default to not overwrite the report file
|
|
127
128
|
};
|
|
@@ -172,12 +173,12 @@ Feature: API Performance Testing
|
|
|
172
173
|
When I set to run the k6 script with the following configurations:
|
|
173
174
|
| virtual_users | duration | http_req_failed | http_req_duration |
|
|
174
175
|
| 50 | 10 | rate<0.05 | p(95)<3000 |
|
|
175
|
-
And I set the following
|
|
176
|
+
And I set the following endpoints used:
|
|
176
177
|
"""
|
|
177
178
|
/api/profile
|
|
178
179
|
[https://reqres.in/api/users?page=2](https://reqres.in/api/users?page=2)
|
|
179
180
|
"""
|
|
180
|
-
And
|
|
181
|
+
And I set the authentication type to "none"
|
|
181
182
|
Then I see the API should handle the GET request successfully
|
|
182
183
|
```
|
|
183
184
|
|
|
@@ -190,9 +191,9 @@ Feature: API Performance Testing
|
|
|
190
191
|
Given I set a k6 script for POST testing
|
|
191
192
|
When I set to run the k6 script with the following configurations:
|
|
192
193
|
| virtual_users | duration | http_req_failed | http_req_duration |
|
|
193
|
-
|
|
|
194
|
-
|
|
195
|
-
And I set the following
|
|
194
|
+
| 20 | 60 | rate<0.01 | p(95)<300 |
|
|
195
|
+
When I set the authentication type to "bearer_token"
|
|
196
|
+
And I set the following endpoints used:
|
|
196
197
|
"""
|
|
197
198
|
/api/v1/users
|
|
198
199
|
"""
|
|
@@ -204,6 +205,7 @@ Feature: API Performance Testing
|
|
|
204
205
|
}
|
|
205
206
|
"""
|
|
206
207
|
Then I see the API should handle the POST request successfully
|
|
208
|
+
|
|
207
209
|
```
|
|
208
210
|
|
|
209
211
|
## Step Definitions
|
|
@@ -211,10 +213,10 @@ Feature: API Performance Testing
|
|
|
211
213
|
### Authentication Steps
|
|
212
214
|
|
|
213
215
|
```gherkin
|
|
214
|
-
When I set the authentication type
|
|
215
|
-
When I set the authentication type
|
|
216
|
-
When I set the authentication type
|
|
217
|
-
When I set the authentication type
|
|
216
|
+
When I set the authentication type to "api_key"
|
|
217
|
+
When I set the authentication type to "bearer_token"
|
|
218
|
+
When I set the authentication type to "basic"
|
|
219
|
+
When I set the authentication type to "none"
|
|
218
220
|
```
|
|
219
221
|
|
|
220
222
|
### Request Configuration Steps
|
|
@@ -223,7 +225,7 @@ When I set the authentication type is "none"
|
|
|
223
225
|
Given I set a k6 script for {word} testing
|
|
224
226
|
When I set to run the k6 script with the following configurations:
|
|
225
227
|
When I set the request headers:
|
|
226
|
-
When I set the following
|
|
228
|
+
When I set the following endpoints used:
|
|
227
229
|
When I set the following {word} body is used for {string}
|
|
228
230
|
```
|
|
229
231
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "k6-cucumber-steps",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -50,23 +50,21 @@
|
|
|
50
50
|
"author": "qaPaschalE",
|
|
51
51
|
"description": "Cucumber step definitions for running k6 performance tests.",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/cli": "
|
|
54
|
-
"@babel/core": "
|
|
55
|
-
"@babel/preset-env": "
|
|
56
|
-
"@
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"dotenv": "^16.5.0",
|
|
70
|
-
"yargs": "^17.7.2"
|
|
53
|
+
"@babel/cli": "latest",
|
|
54
|
+
"@babel/core": "latest",
|
|
55
|
+
"@babel/preset-env": "latest",
|
|
56
|
+
"@babel/register": "latest",
|
|
57
|
+
"@cucumber/cucumber": "latest",
|
|
58
|
+
"@faker-js/faker": "latest",
|
|
59
|
+
"@types/k6": "latest",
|
|
60
|
+
"child_process": "latest",
|
|
61
|
+
"cucumber-console-formatter": "latest",
|
|
62
|
+
"cucumber-html-reporter": "latest",
|
|
63
|
+
"dotenv": "latest",
|
|
64
|
+
"esbuild": "latest",
|
|
65
|
+
"form-data": "latest",
|
|
66
|
+
"k6": "latest",
|
|
67
|
+
"tsconfig-paths": "latest",
|
|
68
|
+
"yargs": "latest"
|
|
71
69
|
}
|
|
72
70
|
}
|