@testrelic/playwright-analytics 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +304 -0
- package/dist/cli.cjs +146 -0
- package/dist/fixture.cjs +291 -0
- package/dist/fixture.cjs.map +1 -0
- package/dist/fixture.d.cts +6 -0
- package/dist/fixture.d.ts +6 -0
- package/dist/fixture.js +265 -0
- package/dist/fixture.js.map +1 -0
- package/dist/index.cjs +773 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +100 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +745 -0
- package/dist/index.js.map +1 -0
- package/dist/merge.cjs +115 -0
- package/dist/merge.cjs.map +1 -0
- package/dist/merge.d.cts +12 -0
- package/dist/merge.d.ts +12 -0
- package/dist/merge.js +90 -0
- package/dist/merge.js.map +1 -0
- package/package.json +80 -0
- package/timeline-schema.json +190 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "TestRelic Analytics Timeline",
|
|
4
|
+
"description": "Schema for the @testrelic/playwright-analytics JSON timeline report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"testRunId",
|
|
9
|
+
"startedAt",
|
|
10
|
+
"completedAt",
|
|
11
|
+
"totalDuration",
|
|
12
|
+
"summary",
|
|
13
|
+
"ci",
|
|
14
|
+
"metadata",
|
|
15
|
+
"timeline",
|
|
16
|
+
"shardRunIds"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schemaVersion": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Semantic version of the schema"
|
|
22
|
+
},
|
|
23
|
+
"testRunId": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Unique identifier for the test run"
|
|
26
|
+
},
|
|
27
|
+
"startedAt": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time",
|
|
30
|
+
"description": "ISO-8601 start timestamp"
|
|
31
|
+
},
|
|
32
|
+
"completedAt": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "date-time",
|
|
35
|
+
"description": "ISO-8601 completion timestamp"
|
|
36
|
+
},
|
|
37
|
+
"totalDuration": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"minimum": 0,
|
|
40
|
+
"description": "Total duration in milliseconds"
|
|
41
|
+
},
|
|
42
|
+
"summary": {
|
|
43
|
+
"$ref": "#/definitions/Summary"
|
|
44
|
+
},
|
|
45
|
+
"ci": {
|
|
46
|
+
"oneOf": [
|
|
47
|
+
{ "$ref": "#/definitions/CIMetadata" },
|
|
48
|
+
{ "type": "null" }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"metadata": {
|
|
52
|
+
"oneOf": [
|
|
53
|
+
{ "type": "object" },
|
|
54
|
+
{ "type": "null" }
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"timeline": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "$ref": "#/definitions/TimelineEntry" }
|
|
60
|
+
},
|
|
61
|
+
"shardRunIds": {
|
|
62
|
+
"oneOf": [
|
|
63
|
+
{ "type": "array", "items": { "type": "string" } },
|
|
64
|
+
{ "type": "null" }
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"definitions": {
|
|
69
|
+
"Summary": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["total", "passed", "failed", "flaky", "skipped"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
74
|
+
"passed": { "type": "integer", "minimum": 0 },
|
|
75
|
+
"failed": { "type": "integer", "minimum": 0 },
|
|
76
|
+
"flaky": { "type": "integer", "minimum": 0 },
|
|
77
|
+
"skipped": { "type": "integer", "minimum": 0 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"CIMetadata": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["provider"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"provider": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"enum": ["github-actions", "gitlab-ci", "jenkins", "circleci", "unknown"]
|
|
87
|
+
},
|
|
88
|
+
"buildId": { "type": ["string", "null"] },
|
|
89
|
+
"commitSha": { "type": ["string", "null"] },
|
|
90
|
+
"branch": { "type": ["string", "null"] }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"TimelineEntry": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": [
|
|
96
|
+
"url", "navigationType", "visitedAt", "duration",
|
|
97
|
+
"specFile", "domContentLoadedAt", "networkIdleAt",
|
|
98
|
+
"networkStats", "tests"
|
|
99
|
+
],
|
|
100
|
+
"properties": {
|
|
101
|
+
"url": { "type": "string" },
|
|
102
|
+
"navigationType": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"enum": [
|
|
105
|
+
"goto", "navigation", "back", "forward", "refresh",
|
|
106
|
+
"spa_route", "spa_replace", "hash_change", "link_click",
|
|
107
|
+
"form_submit", "redirect", "popstate", "page_load",
|
|
108
|
+
"manual_record", "fallback", "dummy"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"visitedAt": { "type": "string", "format": "date-time" },
|
|
112
|
+
"duration": { "type": "number", "minimum": 0 },
|
|
113
|
+
"specFile": { "type": "string" },
|
|
114
|
+
"domContentLoadedAt": { "type": ["string", "null"] },
|
|
115
|
+
"networkIdleAt": { "type": ["string", "null"] },
|
|
116
|
+
"networkStats": {
|
|
117
|
+
"oneOf": [
|
|
118
|
+
{ "$ref": "#/definitions/NetworkStats" },
|
|
119
|
+
{ "type": "null" }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"tests": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": { "$ref": "#/definitions/TestResult" }
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"TestResult": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": [
|
|
131
|
+
"title", "status", "duration", "startedAt",
|
|
132
|
+
"completedAt", "retryCount", "tags", "failure"
|
|
133
|
+
],
|
|
134
|
+
"properties": {
|
|
135
|
+
"title": { "type": "string" },
|
|
136
|
+
"status": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"enum": ["passed", "failed", "flaky"]
|
|
139
|
+
},
|
|
140
|
+
"duration": { "type": "number", "minimum": 0 },
|
|
141
|
+
"startedAt": { "type": "string", "format": "date-time" },
|
|
142
|
+
"completedAt": { "type": "string", "format": "date-time" },
|
|
143
|
+
"retryCount": { "type": "integer", "minimum": 0 },
|
|
144
|
+
"tags": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": { "type": "string" }
|
|
147
|
+
},
|
|
148
|
+
"failure": {
|
|
149
|
+
"oneOf": [
|
|
150
|
+
{ "$ref": "#/definitions/FailureDiagnostic" },
|
|
151
|
+
{ "type": "null" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"FailureDiagnostic": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"required": ["message", "line", "code", "stack"],
|
|
159
|
+
"properties": {
|
|
160
|
+
"message": { "type": "string" },
|
|
161
|
+
"line": { "type": ["integer", "null"] },
|
|
162
|
+
"code": { "type": ["string", "null"] },
|
|
163
|
+
"stack": { "type": ["string", "null"] }
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"NetworkStats": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"required": ["totalRequests", "failedRequests", "totalBytes", "byType"],
|
|
169
|
+
"properties": {
|
|
170
|
+
"totalRequests": { "type": "integer", "minimum": 0 },
|
|
171
|
+
"failedRequests": { "type": "integer", "minimum": 0 },
|
|
172
|
+
"totalBytes": { "type": "integer", "minimum": 0 },
|
|
173
|
+
"byType": { "$ref": "#/definitions/ResourceBreakdown" }
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"ResourceBreakdown": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"required": ["xhr", "document", "script", "stylesheet", "image", "font", "other"],
|
|
179
|
+
"properties": {
|
|
180
|
+
"xhr": { "type": "integer", "minimum": 0 },
|
|
181
|
+
"document": { "type": "integer", "minimum": 0 },
|
|
182
|
+
"script": { "type": "integer", "minimum": 0 },
|
|
183
|
+
"stylesheet": { "type": "integer", "minimum": 0 },
|
|
184
|
+
"image": { "type": "integer", "minimum": 0 },
|
|
185
|
+
"font": { "type": "integer", "minimum": 0 },
|
|
186
|
+
"other": { "type": "integer", "minimum": 0 }
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|