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
The above code is quite simple, but it needs some explanation.
53
51
54
-
#### AddReplacementValues
52
+
## Description
53
+
54
+
#### 1. AddReplacementValues
55
55
This is a method that will add key/value pairs for replacement values you need to replace in the Swagger requests.
56
56
57
57
In the example above we say: "Replace `{version}` placeholder in Path and URL parameters and JSON body models."
@@ -62,13 +62,13 @@ That, does not stop there, you can also populate JSON request bodies in this way
62
62
63
63
[TODO sample JSON Body]
64
64
65
-
#### AddBasicAuthentication
65
+
#### 2. AddBasicAuthentication
66
66
If your Swagger.json files are protected by basic authentication, you can set those with `AddBasicAuthentication`.
67
67
68
-
#### AddRequestFilters
68
+
#### 3, AddRequestFilters
69
69
Filters comprise of different types. Those are `AuthenticationTypes`, `TestTypes` and `EndpointNameWhitelist`.
70
70
71
-
##### AuthenticationTypes
71
+
##### 3.1. AuthenticationTypes
72
72
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.
73
73
The built-in types are:
74
74
-`AuthenticationType.Customer` which specifies a string `"@customer"`,
@@ -96,7 +96,7 @@ This is an example from swagger.json excerpt:
96
96
97
97
Parser then finds those string in the description field and populates the `RequestFilter` property.
98
98
99
-
##### TestTypes
99
+
##### 3.2 TestTypes
100
100
Similarly as in the `AuthenticationTypes` you can filter out certain endpoints to be used in certain test scenarios. Currently libraray supports:
101
101
102
102
- TestType.LoadTest which specifies a string `"@loadtest"`,
@@ -116,7 +116,7 @@ The same swagger-json excerpt which allows load and integration tests.
116
116
"operationId": "GetCategories",
117
117
```
118
118
119
-
##### EndpointNameWhitelist
119
+
##### 3.3 EndpointNameWhitelist
120
120
Final `RequestFilter` option is `EndpointNameWhitelist`. With it you can specify a list of endpoints that will be included in the results.
121
121
122
122
Every other endpoint will be excluded. In the sample above we have set the result to include only `GetCategories` endpoint. That corresponds to the `operationId` in the swagger file above.
0 commit comments