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
@@ -82,23 +79,61 @@ Use `AddApiKey` if your APIs are protected by simple API Key. Pass Api Key in th
82
79
##### 1.3 AddBasicAuthentication
83
80
Use `AddBasicAuthentication` if your APIs are protected by basic authentication. Pass username and password in the method. A basic `Authentication` HTTP header will be generated. This is not best practice, but it's here if you need it.
84
81
85
-
#### 2. Bombardier parameters
86
-
87
-
You can set 5 Bombardier properties:
82
+
##### 1.4 AddReplacementValues
83
+
When you use `AddReplacementValues` values those can set or replace URL and HTTP body parameters before executing the tests. Replacement values have precedence over the `example` values that are set in Swagger file.
88
84
89
-
-`BombardierConcurrentUsers`: How many concurrent users should be used in Bombardier tests.
90
-
-`BombardierDuration`: How long the Bombardier tests should execute in seconds. Use this depending on the type of test you want to perform and should not be used with `BombardierRateLimit`.
91
-
-`BombardierTimeout`: What is the Bombardier timeout to wait for the requests to finish.
92
-
-`BombardierUseHttp2`: Use HTTP2?
93
-
-`BombardierRateLimit`: Rate limit Bombardier tests per second. Use this depending on the type of test you want to perform and should not be used with `BombardierDuration`.
85
+
#### 2. Bombardier parameters
94
86
87
+
You can also set those `BombardierGeneratorOptions` options:
88
+
89
+
-`BombardierConcurrentUsers`: How many concurrent users should be used in Bombardier tests. Default is `3`.
90
+
-`BombardierDuration`: How long the Bombardier tests should execute in seconds. Use this depending on the type of test you want to perform and should not be used with `BombardierRateLimit`. Default is `30` seconds.
91
+
-`BombardierTimeout`: What is the Bombardier timeout to wait for the requests to finish. Default is `30` seconds.
92
+
-`BombardierUseHttp2`: Use HTTP2 protocol. Otherwise HTTP1 is used. By default this is set to `true`.
93
+
-`BombardierRateLimit`: Rate limit Bombardier tests per second. Use this depending on the type of test you want to perform and should not be used with `BombardierDuration`. By default rate limit is not set.
94
+
-`BombardierNumberOfTotalRequests`: Limit the test to run only certain amount of requests. By default total number of requests is not set.
95
+
-`BombardierInsecure`: Instead of HTTPS use HTTP protocol. Default value is `false`.
96
+
-`BombardierBodyContentType`: Force only certain HTTP Content type. By default is set to `application/json`.
97
+
95
98
#### 3. Obfuscate Auth tokens for Bombardier output
96
99
97
100
Output is obfuscated by default, but you can turn it off with `options.ObfuscateAuthenticationHeader = false;` in `BombardierTestsRunner` options.
98
101
99
102
## How to use
100
103
101
-
TO-DO
104
+
In the sample code above we generate HTTP requests from previously generated object which was serialized to JSON.
105
+
106
+
If you use Swagger files, you need to check the `QAToolKit.Source.Swagger` NuGet package, where you can generate that object from the Swagger file.
107
+
108
+
Let's replace
109
+
110
+
```csharp
111
+
//Generate requests from previously stored JSON file:
0 commit comments