forked from cucumber/messages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pickle.json
191 lines (191 loc) · 5.42 KB
/
Pickle.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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "Pickle.json",
"additionalProperties": false,
"definitions": {
"PickleDocString": {
"additionalProperties": false,
"required": [
"content"
],
"properties": {
"mediaType": {
"type": "string"
},
"content": {
"type": "string"
}
},
"type": "object"
},
"PickleStep": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "*\n An executable step",
"required": [
"astNodeIds",
"id",
"text"
],
"properties": {
"argument": {
"$ref": "#/definitions/PickleStepArgument"
},
"astNodeIds": {
"description": "References the IDs of the source of the step. For Gherkin, this can be\n the ID of a Step, and possibly also the ID of a TableRow",
"items": {
"type": "string"
},
"type": "array",
"minItems": 1
},
"id": {
"description": "A unique ID for the PickleStep",
"type": "string"
},
"type": {
"description": "The context in which the step was specified: context (Given), action (When) or outcome (Then).\n\nNote that the keywords `But` and `And` inherit their meaning from prior steps and the `*` 'keyword' doesn't have specific meaning (hence Unknown)",
"type": "string",
"enum": [
"Unknown",
"Context",
"Action",
"Outcome"
]
},
"text": {
"type": "string"
}
},
"type": "object"
},
"PickleStepArgument": {
"additionalProperties": false,
"description": "An optional argument",
"properties": {
"docString": {
"$ref": "#/definitions/PickleDocString"
},
"dataTable": {
"$ref": "#/definitions/PickleTable"
}
},
"type": "object"
},
"PickleTable": {
"additionalProperties": false,
"required": [
"rows"
],
"properties": {
"rows": {
"items": {
"$ref": "#/definitions/PickleTableRow"
},
"type": "array"
}
},
"type": "object"
},
"PickleTableCell": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
}
},
"type": "object"
},
"PickleTableRow": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"required": [
"cells"
],
"properties": {
"cells": {
"items": {
"$ref": "#/definitions/PickleTableCell"
},
"type": "array",
"minItems": 1
}
},
"type": "object"
},
"PickleTag": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"description": "*\n A tag",
"required": [
"name",
"astNodeId"
],
"properties": {
"name": {
"type": "string"
},
"astNodeId": {
"description": "Points to the AST node this was created from",
"type": "string"
}
},
"type": "object"
}
},
"description": "//// Pickles\n\n*\n A `Pickle` represents a template for a `TestCase`. It is typically derived\n from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument).\n In the future a `Pickle` may be derived from other formats such as Markdown or\n Excel files.\n\n By making `Pickle` the main data structure Cucumber uses for execution, the\n implementation of Cucumber itself becomes simpler, as it doesn't have to deal\n with the complex structure of a [GherkinDocument](#io.cucumber.messages.GherkinDocument).\n\n Each `PickleStep` of a `Pickle` is matched with a `StepDefinition` to create a `TestCase`",
"required": [
"id",
"uri",
"name",
"language",
"steps",
"tags",
"astNodeIds"
],
"properties": {
"id": {
"description": "*\n A unique id for the pickle",
"type": "string"
},
"uri": {
"description": "The uri of the source file",
"type": "string"
},
"name": {
"description": "The name of the pickle",
"type": "string"
},
"language": {
"description": "The language of the pickle",
"type": "string"
},
"steps": {
"description": "One or more steps",
"items": {
"$ref": "#/definitions/PickleStep"
},
"type": "array"
},
"tags": {
"description": "*\n One or more tags. If this pickle is constructed from a Gherkin document,\n It includes inherited tags from the `Feature` as well.",
"items": {
"$ref": "#/definitions/PickleTag"
},
"type": "array"
},
"astNodeIds": {
"description": "*\n Points to the AST node locations of the pickle. The last one represents the unique\n id of the pickle. A pickle constructed from `Examples` will have the first\n id originating from the `Scenario` AST node, and the second from the `TableRow` AST node.",
"items": {
"type": "string"
},
"type": "array",
"minItems": 1
}
},
"type": "object"
}