-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrst-test-spec-schema.yaml
More file actions
442 lines (423 loc) · 13.2 KB
/
Copy pathrst-test-spec-schema.yaml
File metadata and controls
442 lines (423 loc) · 13.2 KB
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
openapi: 3.1.0
info:
title: Schema for the RST Test Specifications
version: 1.15.0
description: |
This file contains a schema which describes the RST Test Specifications YAML
format.
components:
schemas:
rstTestSpec:
additionalProperties: false
description: |
The `rstTestSpec` schema describes the format of the RST Test
Specifications YAML format.
type: object
required:
- RST-Test-Plan-Schema-Version
- Version
- Preamble
- ChangeLog
- Contact
- Configuration
- Test-Plans
- Test-Suites
- Test-Cases
- Input-Parameters
- Resources
- Errors
- Data-Providers
properties:
RST-Test-Plan-Schema-Version:
description: |
This property conforms to the [Semantic Versioning](https://semver.org)
convention, and tracks the version of **this** document, and is
updated whenever a material change to the schema is made. Its value
is always equal to the value of the `info.version` property of
*this* schema.
type: string
pattern: ^\d+\.\d+\.\d+$
Version:
description: |
A string containing the semantic version number for the
specification itself.
type: string
pattern: ^\d+\.\d+\.\d+$
Preamble:
description: |
A description of the contents of the file, in Markdown format.
type: string
ChangeLog:
description: |
A log of all changes made to the specification. The object property
names are dates in `YYYY-MM-DD` format, and the values are arrays
of Markdown text.
type: object
patternProperties:
"^[0-9]{4}-[0-9]{2}-[0-9]{2}$":
type: array
items:
type: string
Contact:
description: A `rstTestSpecContact` object.
type: object
schema:
$ref: "#/components/schemas/rstTestSpecContact"
Configuration:
description: |
A collection of configuration parameters for the RST test system
itself.
type: array
items:
type: object
required:
- Name
- Value
properties:
Name:
description: The name of the parameter.
type: string
Value:
description: The value of the parameter.
type: string
Test-Plans:
description: An object containing Test Plan objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstTestPlan"
Test-Suites:
description: An object containing Test Suite objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstTestSuite"
Test-Cases:
description: An object containing Test Suite objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstTestCase"
Input-Parameters:
description: An object containing Input Parameter objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstInputParameter"
Resources:
description: An object containing Resource objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstResource"
Errors:
description: An object containing Error objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstError"
Data-Providers:
description: An object containing Data Provider objects.
type: object
patternProperties:
"^.+$":
type: object
schema:
$ref: "#/components/schemas/rstDataProvider"
rstTestSpecContact:
additionalProperties: false
description: |
An object containing contact information for the maintainer of the RST
Test Specifications YAML file.
type: object
required:
- Name
- Organization
- Email
properties:
Name:
description: Contact name.
type: string
Organization:
description: Contact organization.
type: string
Email:
description: Contact email.
type: string
format: email
rstTestPlan:
additionalProperties: false
description: An object describing a test plan.
type: object
required:
- Name
- Order
- Description
- Test-Suites
- Environments
properties:
Name:
description: The name of the plan.
type: string
Order:
description: |
The canonical order of the plan (only used to generate the HTML
representation).
type: integer
format: uint8
Description:
description: A description of the plan in Markdown format.
type: string
Test-Suites:
description: An array of Test Suite IDs.
type: array
items:
type: string
OTE-Only:
description: |
A boolean indicating that this test plan is only available in OT&E.
If `false`, then this test plan is available in both production and
OT&E.
type: boolean
rstTestSuite:
additionalProperties: false
description: An object describing a test suite.
type: object
required:
- Name
- Description
- Test-Cases
- Input-Parameters
properties:
Name:
description: The name of the suite.
type: string
Order:
description: |
The canonical order of the suite (only used to generate the HTML
representation).
type: integer
format: uint8
Description:
description: A description of the suite in Markdown format.
type: string
Test-Cases:
description: |
Either an array of test case IDs, or a regular expression used
to filter them.
type:
- array
- string
Input-Parameters:
description: |
An array of input parameter IDs which must be provided in
addition to the input parameters specified by the test cases for
the suite.
type: array
Resources:
description: |
An array of resource IDs which may be used to prepare for the
tests in this test suite, in addition to those specified by the
test cases for the suite.
type: array
rstTestCase:
additionalProperties: false
description: An object describing a test case.
type: object
required:
- Summary
- Description
properties:
Summary:
description: A short description of the test case.
type: string
Description:
description: A description of the case in Markdown format.
type: string
Dependencies:
description: An array of dependencies.
type: array
items:
type: string
Input-Parameters:
description: |
An array of input parameter IDs which must be provided in
addition to the input parameters specified by the test suite(s)
that use this test case.
type: array
Resources:
description: |
an array of resource IDs which may be used to prepare for the
tests in this test suite, in addition to those specified by the
test suite(s) that use this test case.
type: array
Errors:
description: |
an array of error IDs which may be produced by this test suite,
in addition to those specified by the test suite(s) that use
this test case.
type: array
Data-Providers:
description: |
An array of Data Provider IDs which identify the Data Provider(s)
that will be used to perform tests for this test case.
type: array
description: An object describing an input parameter.
type: object
required:
- Description
- Type
properties:
Description:
description: A description of the parameter in Markdown format.
type: string
Type:
description: |
The type of the parameter, one of `file` or `input`.
enum:
- "file"
- "input"
Example:
description: An example value for this parameter.
Required:
description: |
Whether this input parameter is required or optional. If not set,
then it is optional.
type: boolean
default: false
Schema:
description: |
an [OpenAPI `Schema`
object](https://spec.openapis.org/oas/latest.html#schemaObject)
which can be used to validate this parameter.
type: object
rstResource:
additionalProperties: false
description: An object describing a resource.
type: object
required:
- Description
- URL
properties:
Description:
description: A description of the resource in Markdown format.
type: string
URL:
description: The URL where the resource may be found.
type: string
format: url
rstError:
additionalProperties: false
description: An object describing an error message.
type: object
required:
- Description
- Severity
properties:
Description:
description: A description of the error in Markdown format.
type: string
Severity:
description: The severity of the error.
enum:
- INFO
- NOTICE
- WARNING
- ERROR
- CRITICAL
rstInputParameter:
additionalProperties: false
description: An object describing an input parameter.
type: object
required:
- Description
- Schema
properties:
Description:
description: A description of the input parameter in Markdown format.
type: string
Type:
description: the type of the parameter.
type: string
enum:
- input
- file
Example:
description: An example value.
Required:
description: Whether it is mandatory to provide this value.
type: boolean
default: false
Schema:
$ref: "https://json-schema.org/draft/2020-12/schema"
rstDataProvider:
additionalProperties: false
description: |
An object describing a Data Provider.
type: object
required:
- Description
- Columns
- Rows
properties:
Description:
description: A description of the Data Provider in Markdown format.
type: string
Columns:
description: A list of columns.
type: array
minItems: 1
items:
$ref: "#/components/schemas/rstDataProviderColumn"
Rows:
description: |
A two-dimensional array (array of arrays) containing the data.
type: array
minItems: 1
items:
type: array
minItems: 1
rstDataProviderColumn:
additionalProperties: false
description: An object describing a column in a data provider.
type: object
required:
- Name
- Description
- Type
properties:
Name:
description: The name of the column.
type: string
Description:
description: A description of the column in Markdown format.
type: string
Type:
description: |
The type of the column. The possible values are a subset of the
basic JSON Schema types found at
<https://json-schema.org/understanding-json-schema/reference/type>.
The permitted values are:
* `string` - a sequence of Unicode text.
* `integer` - a positive or negative number with no fractional part.
* `number` - a positive or negative decimal number which may
optionally have a fractional part.
* `boolean` - `true` or `false`.
type: string
enum:
- string
- integer
- number
- boolean