Skip to content

Commit bd4f6db

Browse files
committed
relacement values to dictionary, additional tests
1 parent a76ac7f commit bd4f6db

File tree

10 files changed

+456
-136
lines changed

10 files changed

+456
-136
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# QAToolKit.Engine.Bombardier
22
![.NET Core](https://github.com/qatoolkit/qatoolkit-engine-bombardier-net/workflows/.NET%20Core/badge.svg?branch=main)
33

4-
`QAToolKit.Engine.Bombardier` is a .NET standard library, which takes `IList<HttpTestRequest>` object and runs load tests with tool called [Bombardier](https://github.com/codesenberg/bombardier).
4+
`QAToolKit.Engine.Bombardier` is a .NET standard library, which takes `IEnumerable<HttpTestRequest>` object and runs load tests with tool called [Bombardier](https://github.com/codesenberg/bombardier).
55

66
Library is a thin wrapper, that generates requests and parses results so you can export them to whatever format you prefer.
77

88
Major features:
99

10-
- Library takes `IList<HttpTestRequest>` object, which can be produced in your code or can be imported from other sources. One example can be QAToolKit Swagger library that can produce that object with many options. Check it out [here](https://github.com/qatoolkit/qatoolkit-source-swagger-net).
10+
- Library takes `IEnumerable<HttpTestRequest>` object, which can be produced in your code or can be imported from other sources. One example can be QAToolKit Swagger library that can produce that object with many options. Check it out [here](https://github.com/qatoolkit/qatoolkit-source-swagger-net).
1111
- Generate a Bombardier report that can be exported to the format you want.
1212

1313
Bombardier version [1.2.5](https://github.com/codesenberg/bombardier/releases/tag/v1.2.5) is used for `windows-amd64` and `linux-amd64`.
@@ -17,7 +17,7 @@ Bombardier version [1.2.5](https://github.com/codesenberg/bombardier/releases/ta
1717
```csharp
1818
//Generate requests from previously stored JSON file:
1919
var content = File.ReadAllText("Assets/getPetById.json");
20-
var httpRequest = JsonConvert.DeserializeObject<IList<HttpRequest>>(content);
20+
var httpRequest = JsonConvert.DeserializeObject<IEnumerable<HttpRequest>>(content);
2121

2222
//Create bombardier tests generator
2323
var bombardierTestsGenerator = new BombardierTestsGenerator(options =>
@@ -110,7 +110,7 @@ Let's replace
110110
```csharp
111111
//Generate requests from previously stored JSON file:
112112
var content = File.ReadAllText("Assets/getPetById.json");
113-
var httpRequest = JsonConvert.DeserializeObject<IList<HttpRequest>>(content);
113+
var httpRequest = JsonConvert.DeserializeObject<IEnumerable<HttpRequest>>(content);
114114
```
115115

116116
with
Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
[
2+
{
3+
"BasePath": "https://petstore3.swagger.io/sales/support/v2",
4+
"Path": "/SupportTicket",
5+
"OperationId": "getSupportTicketsList",
6+
"Method": {
7+
"Method": "GET"
8+
},
9+
"Summary": null,
10+
"Description": "Get a list of helpdesks and their attachments\n\nAffected systems: DSystem\n",
11+
"Tags": [
12+
"Support Ticket"
13+
],
14+
"Parameters": [
15+
{
16+
"Name": "CaseId",
17+
"Type": "string",
18+
"Nullable": false,
19+
"Value": null,
20+
"Required": true,
21+
"Location": 2
22+
},
23+
{
24+
"Name": "Area",
25+
"Type": "string",
26+
"Nullable": false,
27+
"Value": null,
28+
"Required": false,
29+
"Location": 2
30+
}
31+
],
32+
"RequestBodies": [],
33+
"Responses": [
34+
{
35+
"StatusCode": 200,
36+
"Type": 3,
37+
"Properties": [
38+
{
39+
"Name": "CaseId",
40+
"Description": "Case id",
41+
"Format": "guid",
42+
"Type": "string",
43+
"Value": null,
44+
"Required": false,
45+
"Properties": null
46+
},
47+
{
48+
"Name": "Title",
49+
"Description": "Case title",
50+
"Format": null,
51+
"Type": "string",
52+
"Value": null,
53+
"Required": false,
54+
"Properties": null
55+
},
56+
{
57+
"Name": "Status",
58+
"Description": "Case status",
59+
"Format": null,
60+
"Type": "string",
61+
"Value": null,
62+
"Required": false,
63+
"Properties": null
64+
},
65+
{
66+
"Name": "IdentityId",
67+
"Description": "Identity id",
68+
"Format": "guid",
69+
"Type": "string",
70+
"Value": null,
71+
"Required": false,
72+
"Properties": null
73+
},
74+
{
75+
"Name": "CreatedOn",
76+
"Description": "Datetime the case was created on",
77+
"Format": "date",
78+
"Type": "string",
79+
"Value": null,
80+
"Required": false,
81+
"Properties": null
82+
},
83+
{
84+
"Name": "Tickets",
85+
"Description": null,
86+
"Format": null,
87+
"Type": "array",
88+
"Value": null,
89+
"Required": false,
90+
"Properties": [
91+
{
92+
"Name": null,
93+
"Description": null,
94+
"Format": null,
95+
"Type": "object",
96+
"Value": null,
97+
"Required": false,
98+
"Properties": [
99+
{
100+
"Name": "ParentCase",
101+
"Description": "Case id this support ticket is connected",
102+
"Format": "guid",
103+
"Type": "string",
104+
"Value": null,
105+
"Required": false,
106+
"Properties": null
107+
},
108+
{
109+
"Name": "Subject",
110+
"Description": "Support ticket subject",
111+
"Format": null,
112+
"Type": "string",
113+
"Value": null,
114+
"Required": false,
115+
"Properties": null
116+
},
117+
{
118+
"Name": "Message",
119+
"Description": "Support ticket message",
120+
"Format": null,
121+
"Type": "string",
122+
"Value": null,
123+
"Required": false,
124+
"Properties": null
125+
},
126+
{
127+
"Name": "Direction",
128+
"Description": "Message direction:0-Inbound (web -> System) or 1-Outbound (System -> web)",
129+
"Format": null,
130+
"Type": "enum",
131+
"Value": null,
132+
"Required": false,
133+
"Properties": [
134+
{
135+
"Name": null,
136+
"Description": null,
137+
"Format": null,
138+
"Type": "string",
139+
"Value": "0",
140+
"Required": false,
141+
"Properties": null
142+
},
143+
{
144+
"Name": null,
145+
"Description": null,
146+
"Format": null,
147+
"Type": "string",
148+
"Value": "1",
149+
"Required": false,
150+
"Properties": null
151+
}
152+
]
153+
},
154+
{
155+
"Name": "Attachments",
156+
"Description": null,
157+
"Format": null,
158+
"Type": "array",
159+
"Value": null,
160+
"Required": false,
161+
"Properties": [
162+
{
163+
"Name": null,
164+
"Description": null,
165+
"Format": null,
166+
"Type": "object",
167+
"Value": null,
168+
"Required": false,
169+
"Properties": [
170+
{
171+
"Name": "FileId",
172+
"Description": "Attachment file id",
173+
"Format": "guid",
174+
"Type": "string",
175+
"Value": null,
176+
"Required": false,
177+
"Properties": null
178+
},
179+
{
180+
"Name": "FileUri",
181+
"Description": "Attachment file uri",
182+
"Format": "uri",
183+
"Type": "string",
184+
"Value": null,
185+
"Required": false,
186+
"Properties": null
187+
},
188+
{
189+
"Name": "FileName",
190+
"Description": "Attachment file name",
191+
"Format": null,
192+
"Type": "string",
193+
"Value": null,
194+
"Required": false,
195+
"Properties": null
196+
}
197+
]
198+
}
199+
]
200+
}
201+
]
202+
}
203+
]
204+
}
205+
]
206+
},
207+
{
208+
"StatusCode": 400,
209+
"Type": 2,
210+
"Properties": [
211+
{
212+
"Name": "ErrorMessage",
213+
"Description": "Error Message",
214+
"Format": null,
215+
"Type": "string",
216+
"Value": null,
217+
"Required": false,
218+
"Properties": null
219+
},
220+
{
221+
"Name": "ErrorCode",
222+
"Description": "Error code",
223+
"Format": null,
224+
"Type": "string",
225+
"Value": null,
226+
"Required": false,
227+
"Properties": null
228+
},
229+
{
230+
"Name": "Identifier",
231+
"Description": "Identifier, internal bus identifier",
232+
"Format": null,
233+
"Type": "string",
234+
"Value": null,
235+
"Required": false,
236+
"Properties": null
237+
},
238+
{
239+
"Name": "Details",
240+
"Description": "Error details",
241+
"Format": null,
242+
"Type": "string",
243+
"Value": null,
244+
"Required": false,
245+
"Properties": null
246+
}
247+
]
248+
},
249+
{
250+
"StatusCode": 404,
251+
"Type": 2,
252+
"Properties": [
253+
{
254+
"Name": "ErrorMessage",
255+
"Description": "Error Message",
256+
"Format": null,
257+
"Type": "string",
258+
"Value": null,
259+
"Required": false,
260+
"Properties": null
261+
},
262+
{
263+
"Name": "ErrorCode",
264+
"Description": "Error code",
265+
"Format": null,
266+
"Type": "string",
267+
"Value": null,
268+
"Required": false,
269+
"Properties": null
270+
},
271+
{
272+
"Name": "Identifier",
273+
"Description": "Identifier, internal bus identifier",
274+
"Format": null,
275+
"Type": "string",
276+
"Value": null,
277+
"Required": false,
278+
"Properties": null
279+
},
280+
{
281+
"Name": "Details",
282+
"Description": "Error details",
283+
"Format": null,
284+
"Type": "string",
285+
"Value": null,
286+
"Required": false,
287+
"Properties": null
288+
}
289+
]
290+
},
291+
{
292+
"StatusCode": 500,
293+
"Type": 2,
294+
"Properties": [
295+
{
296+
"Name": "ErrorMessage",
297+
"Description": "Error Message",
298+
"Format": null,
299+
"Type": "string",
300+
"Value": null,
301+
"Required": false,
302+
"Properties": null
303+
},
304+
{
305+
"Name": "ErrorCode",
306+
"Description": "Error code",
307+
"Format": null,
308+
"Type": "string",
309+
"Value": null,
310+
"Required": false,
311+
"Properties": null
312+
},
313+
{
314+
"Name": "Identifier",
315+
"Description": "Identifier, internal bus identifier",
316+
"Format": null,
317+
"Type": "string",
318+
"Value": null,
319+
"Required": false,
320+
"Properties": null
321+
},
322+
{
323+
"Name": "Details",
324+
"Description": "Error details",
325+
"Format": null,
326+
"Type": "string",
327+
"Value": null,
328+
"Required": false,
329+
"Properties": null
330+
}
331+
]
332+
}
333+
],
334+
"TestTypes": [],
335+
"AuthenticationTypes": []
336+
}
337+
]

0 commit comments

Comments
 (0)