You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Major features:
8
8
- Parses `OpenAPI v3.0` Swagger files,
9
9
- swagger.json can be loaded from `disk` or from `URL`,
10
10
- access swagger.json from URL, which is protected by `basic authentication`,
11
-
- control which swagger endpoints are called by specifying `request filters` (check below)
11
+
- control which swagger endpoints are returned by specifying `request filters` (check below)
12
12
13
13
## Sample
14
14
@@ -45,7 +45,7 @@ The above code is quite simple, but it needs some explanation.
45
45
If your Swagger.json files are protected by basic authentication, you can set those with `AddBasicAuthentication`.
46
46
47
47
#### 2. AddRequestFilters
48
-
Filters comprise of different types. Those are `AuthenticationTypes`, `TestTypes` and `EndpointNameWhitelist`.
48
+
Filters comprise of different types. Those are `AuthenticationTypes`, `TestTypes` and `EndpointNameWhitelist`. All are optional.
49
49
50
50
##### 2.1. AuthenticationTypes
51
51
Here we specify a list of Authentication types, that will be filtered out from the whole swagger file. This is where QA Tool Kit presents a convention.
@@ -58,7 +58,7 @@ The built-in types are:
58
58
59
59
In order to apply filters, you need to tag your API endpoints with those strings.
60
60
61
-
We normally do it in Swagger endpoint description. An example might be: `Get categories from the system. @customer,@administrator,@oauth2.`
61
+
We normally do that, by adding the tags in the Swagger endpoint description. An example might be: `Get categories from the system. @customer,@administrator,@oauth2.`
62
62
63
63
This is an example from swagger.json excerpt:
64
64
@@ -76,13 +76,13 @@ This is an example from swagger.json excerpt:
76
76
Parser then finds those string in the description field and populates the `RequestFilter` property.
77
77
78
78
##### 2.2 TestTypes
79
-
Similarly as in the `AuthenticationTypes` you can filter out certain endpoints to be used in certain test scenarios. Currently libraray supports:
79
+
Similarly as in the `AuthenticationTypes` you can filter out certain endpoints to be used in different test scenarios. Currently library supports:
80
80
81
81
- TestType.LoadTest which specifies a string `"@loadtest"`,
82
82
- TestType.IntegrationTest which specifies a string `"@integrationtest"`,
83
83
- TestType.SecurityTest which specifies a string `"@securitytest"`,
84
84
85
-
The same swagger-json excerpt which allows load and integration tests.
85
+
The same swagger.json excerpt which support test type tags might look like this:
86
86
87
87
```json
88
88
"/v{version}/categories?parent={parentId}": {
@@ -95,6 +95,8 @@ The same swagger-json excerpt which allows load and integration tests.
95
95
"operationId": "GetCategories",
96
96
```
97
97
98
+
If you feed the list of `HttpRequest` objects with load type tags to the library like `QAToolKit.Engine.Bombardier`, only those requests will be tested.
99
+
98
100
##### 2.3 EndpointNameWhitelist
99
101
Final `RequestFilter` option is `EndpointNameWhitelist`. With it you can specify a list of endpoints that will be included in the results.
0 commit comments