-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathai-report.schema.json
More file actions
240 lines (240 loc) · 8.75 KB
/
ai-report.schema.json
File metadata and controls
240 lines (240 loc) · 8.75 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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/WebProject-xyz/codeception-module-ai-reporter/blob/main/schema/ai-report.schema.json",
"title": "AI Codeception Reporter — ai-report.json",
"description": "Structured failure report emitted by the AI Codeception Reporter extension after each test run.",
"type": "object",
"required": ["run", "summary", "failures"],
"additionalProperties": false,
"properties": {
"run": {
"description": "Metadata about the test run that produced this report.",
"type": "object",
"required": ["generated_at", "duration_seconds", "project_root", "output_dir"],
"additionalProperties": false,
"properties": {
"generated_at": {
"description": "ISO 8601 timestamp at which the report was written.",
"type": "string",
"format": "date-time",
"examples": ["2026-02-19T12:00:00+00:00"]
},
"duration_seconds": {
"description": "Wall-clock seconds elapsed from suite start to report generation.",
"type": "number",
"minimum": 0
},
"project_root": {
"description": "Absolute path to the project root, with forward-slash separators.",
"type": "string",
"minLength": 1
},
"output_dir": {
"description": "Absolute path to the directory where report files are written.",
"type": "string",
"minLength": 1
}
}
},
"summary": {
"description": "Aggregated counts for the entire test run.",
"type": "object",
"required": [
"tests", "successful", "failures", "errors",
"warnings", "skipped", "incomplete", "useless",
"assertions", "successful_run"
],
"additionalProperties": false,
"properties": {
"tests": { "type": "integer", "minimum": 0 },
"successful": { "type": "integer", "minimum": 0 },
"failures": { "type": "integer", "minimum": 0 },
"errors": { "type": "integer", "minimum": 0 },
"warnings": { "type": "integer", "minimum": 0 },
"skipped": { "type": "integer", "minimum": 0 },
"incomplete": { "type": "integer", "minimum": 0 },
"useless": { "type": "integer", "minimum": 0 },
"assertions": { "type": "integer", "minimum": 0 },
"successful_run": {
"description": "True only when there are zero failures, errors, or warnings.",
"type": "boolean"
}
}
},
"failures": {
"description": "One entry per non-successful test, in the order they were captured.",
"type": "array",
"items": { "$ref": "#/$defs/Failure" }
}
},
"$defs": {
"Failure": {
"description": "All context captured for a single non-successful test.",
"type": "object",
"required": [
"status", "suite", "test", "time_seconds",
"exception", "scenario_steps", "trace", "artifacts", "hints"
],
"additionalProperties": false,
"properties": {
"status": {
"description": "Outcome category reported by Codeception.",
"type": "string",
"enum": ["failure", "error", "warning", "incomplete", "skipped", "useless"]
},
"suite": {
"description": "Name of the Codeception suite the test belongs to.",
"type": "string"
},
"test": { "$ref": "#/$defs/TestInfo" },
"time_seconds": {
"description": "Elapsed seconds for this individual test.",
"type": "number",
"minimum": 0
},
"exception": { "$ref": "#/$defs/ExceptionInfo" },
"scenario_steps": {
"description": "Codeception scenario steps recorded up to and including the failing step. Empty for plain unit tests.",
"type": "array",
"items": { "$ref": "#/$defs/ScenarioStep" }
},
"trace": {
"description": "Cleaned and capped stack frames. Vendor noise is removed; the throw-site is prepended as the first frame.",
"type": "array",
"items": { "$ref": "#/$defs/TraceFrame" }
},
"artifacts": {
"description": "Named file artifacts associated with the test (e.g. screenshots, HAR files). Keys are artifact type names; values are file paths.",
"type": "object",
"additionalProperties": { "type": "string" }
},
"hints": {
"description": "Pre-computed triage suggestions derived from the exception type, message, and trace.",
"type": "array",
"items": { "type": "string" }
}
}
},
"TestInfo": {
"description": "Identity information for a single test.",
"type": "object",
"required": ["display_name", "signature", "full_name", "file"],
"additionalProperties": false,
"properties": {
"display_name": {
"description": "Human-readable test label as produced by Codeception's Descriptor.",
"type": "string"
},
"signature": {
"description": "Short stable identifier, e.g. 'MyTest:testSomething'.",
"type": "string"
},
"full_name": {
"description": "Full test identifier including file path.",
"type": "string"
},
"file": {
"description": "Project-relative path to the test file, or null when unavailable.",
"type": ["string", "null"]
}
}
},
"ExceptionInfo": {
"description": "Structured representation of the throwable that caused the test to fail.",
"type": "object",
"required": ["class", "message", "previous"],
"additionalProperties": false,
"properties": {
"class": {
"description": "Fully-qualified class name of the thrown exception.",
"type": "string",
"minLength": 1,
"examples": ["PHPUnit\\Framework\\ExpectationFailedException"]
},
"message": {
"description": "Exception message as returned by getMessage().",
"type": "string"
},
"previous": {
"description": "Chain of previous exceptions, outermost first.",
"type": "array",
"items": { "$ref": "#/$defs/PreviousException" }
},
"comparison_expected": {
"description": "Expected value as a formatted string, present only when the exception carries a PHPUnit ComparisonFailure.",
"type": "string"
},
"comparison_actual": {
"description": "Actual value as a formatted string, present only when the exception carries a PHPUnit ComparisonFailure.",
"type": "string"
},
"comparison_diff": {
"description": "Unified diff between expected and actual, present only when the exception carries a PHPUnit ComparisonFailure.",
"type": "string"
}
}
},
"PreviousException": {
"description": "Condensed representation of a chained previous exception.",
"type": "object",
"required": ["class", "message"],
"additionalProperties": false,
"properties": {
"class": {
"description": "Fully-qualified class name.",
"type": "string",
"minLength": 1
},
"message": {
"description": "Exception message.",
"type": "string"
}
}
},
"TraceFrame": {
"description": "A single stack frame from the cleaned exception trace.",
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"description": "Project-relative (or absolute) path to the source file.",
"type": "string"
},
"line": {
"description": "Line number within the file.",
"type": "integer",
"minimum": 1
},
"call": {
"description": "Callable string, e.g. 'App\\Service\\Foo->run' or 'MyTest::testSomething'.",
"type": "string"
}
}
},
"ScenarioStep": {
"description": "A single Codeception scenario step recorded during the test.",
"type": "object",
"required": ["step", "failed"],
"additionalProperties": false,
"properties": {
"step": {
"description": "Human-readable step description, e.g. 'I click \"Submit\"'.",
"type": "string"
},
"file": {
"description": "Source file where the step is defined.",
"type": "string"
},
"line": {
"description": "Line number of the step definition.",
"type": "integer",
"minimum": 1
},
"failed": {
"description": "True if this step is the one at which the test failed.",
"type": "boolean"
}
}
}
}
}