-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathschema.json
492 lines (492 loc) · 18.4 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Gauge JSON result schema",
"type": "object",
"properties": {
"projectName": {
"description": "Project Name",
"type": "string"
},
"timestamp": {
"description": "Timestamp of execution",
"type": "string"
},
"successRate": {
"description": "Success rate of execution",
"type": "integer"
},
"environment": {
"description": "Environment against which execution is done",
"type": "string"
},
"tags": {
"description": "Tags used to filter specifications during execution",
"type": "string"
},
"executionTime": {
"description": "Execution time for suite in milliseconds",
"type": "integer"
},
"executionStatus": {
"description": "Execution status of suite",
"type": "string"
},
"specResults": {
"description": "Execution result of specifications",
"type": "array",
"items": {
"$ref": "#/definitions/specResult"
}
},
"beforeSuiteHookFailure": {
"description": "Before suite hook failure information",
"$ref": "#/definitions/hookFailure"
},
"beforeSuiteHookMessages": {
"description": "Custom messages written in before suite hooks",
"type": "array",
"items": {
"type": "string"
}
},
"afterSuiteHookFailure": {
"description": "After suite hook failure information",
"$ref": "#/definitions/hookFailure"
},
"afterSuiteHookMessages": {
"description": "Custom messages written in after suite hooks",
"type": "array",
"items": {
"type": "string"
}
},
"passedSpecsCount": {
"description": "Number of passed specifications",
"type": "integer"
},
"failedSpecsCount": {
"description": "Number of failed specifications",
"type": "integer"
},
"skippedSpecsCount": {
"description": "Number of skipped specifications",
"type": "integer"
},
"passedScenariosCount": {
"description": "Number of passed scenarios in suite",
"type": "integer"
},
"failedScenariosCount": {
"description": "Number of failed scenarios in suite",
"type": "integer"
},
"skippedScenariosCount": {
"description": "Number of skipped scenarios in suite",
"type": "integer"
}
},
"required": [
"projectName",
"timestamp",
"successRate",
"environment",
"tags",
"executionTime",
"executionStatus",
"specResults",
"beforeSuiteHookFailure",
"beforeSuiteHookMessages",
"afterSuiteHookFailure",
"afterSuiteHookMessages",
"passedSpecsCount",
"failedSpecsCount",
"skippedSpecsCount",
"passedScenariosCount",
"failedScenariosCount",
"skippedScenariosCount"
],
"definitions": {
"specResult": {
"description": "Specification result",
"type": "object",
"properties": {
"specHeading": {
"description": "Specification heading",
"type": "string"
},
"fileName": {
"description": "File name of specification",
"type": "string"
},
"tags": {
"description": "Specification tags",
"type": "array",
"items": {
"type": "string"
}
},
"executionStatus": {
"description": "Execution status of specification",
"type": "string"
},
"executionTime": {
"description": "Execution time of specification in milliseconds",
"type": "integer"
},
"scenarios": {
"description": "Scenarios of a specification",
"type": "array",
"items": {
"description": "Scenario",
"type": "object",
"properties": {
"scenarioHeading": {
"description": "Scenario heading",
"type": "string"
},
"tags": {
"description": "Specification tags",
"type": "array",
"items": {
"type": "string"
}
},
"executionStatus": {
"description": "Execution status of scenario",
"type": "string"
},
"executionTime": {
"description": "Execution time for scenario in milliseconds",
"type": "integer"
},
"contexts": {
"description": "Context items",
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/specItem"
}
},
"teardowns": {
"description": "Teardown items",
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/specItem"
}
},
"items": {
"description": "Scenario items",
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/specItem"
}
},
"beforeScenarioHookFailure": {
"description": "Before scenario hook failure",
"$ref": "#/definitions/hookFailure"
},
"beforeScenarioHookMessages": {
"description": "Custom messages written in before scenario hooks",
"type": "array",
"items": {
"type": "string"
}
},
"afterScenarioHookFailure": {
"description": "After scenario hook failure",
"$ref": "#/definitions/hookFailure"
},
"afterScenarioHookMessages": {
"description": "Custom messages written in after scenario hooks",
"type": "array",
"items": {
"type": "string"
}
},
"skipErrors": {
"description": "Reasons if scenario is skipped",
"type": "array",
"items": {
"type": "string"
}
},
"tableRowIndex": {
"description": "Table row index, if its a table driven execution",
"type": "integer"
}
},
"required": [
"scenarioHeading",
"tags",
"executionStatus",
"executionTime",
"contexts",
"teardowns",
"items",
"beforeScenarioHookFailure",
"beforeScenarioHookMessages",
"afterScenarioHookFailure",
"afterScenarioHookMessages",
"skipErrors",
"tableRowIndex"
]
}
},
"isTableDriven": {
"description": "True, if specification is a table driven specification",
"type": "boolean"
},
"datatable": {
"description": "Data table, if spec is table driven specification",
"$ref": "#/definitions/table"
},
"beforeSpecHookFailure": {
"description": "Before spec hook failure information",
"$ref": "#/definitions/hookFailure"
},
"beforeSpecHookMessages": {
"description": "Custom messages written in before spec hooks",
"type": "array",
"items": {
"type": "string"
}
},
"afterSpecHookFailure": {
"description": "After spec hook failure information",
"$ref": "#/definitions/hookFailure"
},
"afterSpecHookMessages": {
"description": "Custom messages written in after spec hooks",
"type": "array",
"items": {
"type": "string"
}
},
"passedScenarioCount": {
"description": "Number of passed scenarios in specification",
"type": "integer"
},
"failedScenarioCount": {
"description": "Number of failed scenarios in specification",
"type": "integer"
},
"skippedScenarioCount": {
"description": "Number of skipped scenarios in specification",
"type": "integer"
}
},
"required": [
"specHeading",
"fileName",
"tags",
"executionStatus",
"executionTime",
"scenarios",
"isTableDriven",
"datatable",
"beforeSpecHookFailure",
"beforeSpecHookMessages",
"afterSpecHookFailure",
"afterSpecHookMessages",
"passedScenarioCount",
"failedScenarioCount",
"skippedScenarioCount"
]
},
"result": {
"type": "object",
"properties": {
"status": {
"description": "Execution status, possible values are pass, fail, skip, notExecuted",
"type": "string"
},
"stacktrace": {
"description": "Stacktrace of the failure. Empty if there is no failure",
"type": "string"
},
"screenshot": {
"description": "Screenshot taken at the time of failure. Empty if there is no failure",
"type": "string"
},
"errorMessage": {
"description": "Error message of the failure. Empty if there is no failure",
"type": "string"
},
"executionTime": {
"description": "Time taken for execution in milliseconds",
"type": "integer"
},
"skippedReason": {
"description": "Reason for which execution is skipped",
"type": "string"
},
"messages": {
"type": "array",
"description": "Custom messages",
"items": {
"type": "string"
}
},
"errorType": {
"type": "string",
"description": "Type of error. Possible values are assertion, verification"
}
},
"required": [
"status",
"stackTrace",
"screenshot",
"errorMessage",
"executionTime",
"skippedReason",
"messages",
"errorType"
]
},
"hookFailure": {
"type": [
"object",
"null"
],
"properties": {
"errorMessage": {
"description": "Error message of the failure. Empty if there is no failure",
"type": "string"
},
"screenshot": {
"description": "Screenshot taken at the time of failure. Empty if there is no failure",
"type": "string"
},
"stacktrace": {
"description": "Stacktrace of the failure. Empty if there is no failure",
"type": "string"
}
},
"required": [
"stackTrace",
"screenshot",
"errorMessage"
]
},
"specItem": {
"type": "object",
"properties": {
"itemType": {
"description": "Type of specItem. Possible values are step, concept",
"type": "string"
},
"stepText": {
"description": "Step text as specified in spec file",
"type": "string"
},
"parameters": {
"description": "Step parameters",
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/parameter"
}
},
"beforeStepHookFailure": {
"description": "Before step hook failure information",
"$ref": "#/definitions/hookFailure"
},
"beforeStepHookMessages": {
"description": "Custom messages written in before step hooks",
"type": "array",
"items": {
"type": "string"
}
},
"afterStepHookFailure": {
"description": "After step hook failure information",
"$ref": "#/definitions/hookFailure"
},
"afterStepHookMessages": {
"description": "Custom messages written in after step hooks",
"type": "array",
"items": {
"type": "string"
}
},
"result": {
"description": "Execution result",
"$ref": "#/definitions/result"
}
},
"required": [
"itemType",
"stepText",
"beforeStepHookFailure",
"beforeStepHookMessages",
"afterStepHookFailure",
"afterStepHookMessages",
"result",
"parameters"
]
},
"table": {
"description": "Table",
"type": [
"object",
"null"
],
"properties": {
"headers": {
"type": "array",
"items": {
"type": "string"
}
},
"rows": {
"type": "array",
"items": {
"description": "Table row",
"type": "object",
"properties": {
"cells": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"cells"
]
}
}
},
"required": [
"headers",
"rows"
]
},
"parameter": {
"type": "object",
"properties": {
"parameterType": {
"description": "Type of parameter. Possible values are static, dynamic, table, special_table, special_string",
"type": "string"
},
"name": {
"description": "Name of parameter. Used as key to lookup the value. Empty in case of static parameter type.",
"type": "string"
},
"value": {
"description": "Value of parameter. Valid in case of parameterType being static, dynamic, special_string",
"type": "string"
},
"table": {
"description": "Table parameter. Valid in case of parameterType being table and special_table",
"$ref": "#/definitions/table"
}
},
"required": [
"parameterType"
]
}
}
}