playwright-performance-regression 0.1.0-next.1 → 0.1.0-next.4
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/CHANGELOG.md +431 -0
- package/README.md +96 -64
- package/dist/{chunk-L5C63HEF.js → chunk-CISGJCFW.js} +378 -48
- package/dist/chunk-CXE5IWZY.js +1648 -0
- package/dist/{chunk-B64P2D5A.js → chunk-E2IX265O.js} +395 -206
- package/dist/chunk-IUI4AFE5.cjs +658 -0
- package/dist/{chunk-WZVQK7CQ.cjs → chunk-KELMALEG.cjs} +408 -218
- package/dist/{chunk-GCA73FFP.cjs → chunk-LUA4WRIQ.cjs} +382 -47
- package/dist/chunk-RL27E3AB.js +595 -0
- package/dist/{chunk-DYLCGMI2.js → chunk-S6UH6QPK.js} +6 -1
- package/dist/cli.js +2761 -2339
- package/dist/config.cjs +122 -137
- package/dist/config.d.cts +3 -2
- package/dist/config.d.ts +3 -2
- package/dist/config.js +117 -132
- package/dist/fixture.cjs +9 -5
- package/dist/fixture.d.cts +10 -4
- package/dist/fixture.d.ts +10 -4
- package/dist/fixture.js +4 -4
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +121 -25
- package/dist/index.d.ts +121 -25
- package/dist/index.js +1 -1
- package/dist/perf-api-2DH_keLh.d.cts +17 -0
- package/dist/perf-api-2DH_keLh.d.ts +17 -0
- package/dist/reporter.cjs +5713 -1237
- package/dist/reporter.js +6905 -693
- package/dist/test.cjs +4 -4
- package/dist/test.js +4 -4
- package/package.json +19 -1
- package/schemas/common.schema.json +2 -2
- package/schemas/config.schema.json +72 -26
- package/schemas/outcome.schema.json +2 -2
- package/schemas/run-report.schema.json +549 -20
- package/schemas/samples.schema.json +48 -37
- package/schemas/thresholds.schema.json +1 -1
- package/dist/chunk-3CLCMD2Q.js +0 -3411
- package/dist/chunk-4SFI55HF.cjs +0 -319
- package/dist/chunk-HBGADXLP.js +0 -254
- package/dist/perf-api-V4PeHVE0.d.cts +0 -22
- package/dist/perf-api-V4PeHVE0.d.ts +0 -22
package/dist/test.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkKELMALEG_cjs = require('./chunk-KELMALEG.cjs');
|
|
4
|
+
require('./chunk-IUI4AFE5.cjs');
|
|
5
|
+
require('./chunk-LUA4WRIQ.cjs');
|
|
6
6
|
var test$1 = require('@playwright/test');
|
|
7
7
|
|
|
8
|
-
var test =
|
|
8
|
+
var test = chunkKELMALEG_cjs.withPerfFixtures(test$1.test);
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "expect", {
|
|
11
11
|
enumerable: true,
|
package/dist/test.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { withPerfFixtures } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { withPerfFixtures } from './chunk-E2IX265O.js';
|
|
2
|
+
import './chunk-S6UH6QPK.js';
|
|
3
|
+
import './chunk-RL27E3AB.js';
|
|
4
|
+
import './chunk-CISGJCFW.js';
|
|
5
5
|
import { test as test$1 } from '@playwright/test';
|
|
6
6
|
export { expect } from '@playwright/test';
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-performance-regression",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.4",
|
|
4
4
|
"description": "Catch backend performance regressions from the Playwright tests you already have.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"playwright",
|
|
@@ -83,6 +83,22 @@
|
|
|
83
83
|
"main": "./dist/index.cjs",
|
|
84
84
|
"module": "./dist/index.js",
|
|
85
85
|
"types": "./dist/index.d.cts",
|
|
86
|
+
"typesVersions": {
|
|
87
|
+
"*": {
|
|
88
|
+
"config": [
|
|
89
|
+
"./dist/config.d.cts"
|
|
90
|
+
],
|
|
91
|
+
"fixture": [
|
|
92
|
+
"./dist/fixture.d.cts"
|
|
93
|
+
],
|
|
94
|
+
"test": [
|
|
95
|
+
"./dist/test.d.cts"
|
|
96
|
+
],
|
|
97
|
+
"reporter": [
|
|
98
|
+
"./dist/reporter.d.cts"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
86
102
|
"bin": {
|
|
87
103
|
"playwright-performance-regression": "dist/cli.js",
|
|
88
104
|
"pw-perf": "dist/cli.js"
|
|
@@ -114,6 +130,8 @@
|
|
|
114
130
|
"check:ci-generated": "node scripts/build-ci-templates.mjs --check",
|
|
115
131
|
"gen:docs": "node scripts/build-config-docs.mjs",
|
|
116
132
|
"check:docs-generated": "node scripts/build-config-docs.mjs --check",
|
|
133
|
+
"gen:config-template": "node scripts/build-config-template.mjs",
|
|
134
|
+
"check:config-template-generated": "node scripts/build-config-template.mjs --check",
|
|
117
135
|
"check:packages": "node scripts/check-packages.mjs",
|
|
118
136
|
"publint": "publint --strict && publint --strict create",
|
|
119
137
|
"attw": "attw --pack . --profile node16"
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"mode": { "description": "Perf mode of the run: 'test' (measurement run) or 'thresholds' (thresholds derivation run).", "enum": ["test", "thresholds"] },
|
|
25
25
|
"envLabel": { "description": "Environment label (D-18). Lowercase letters, digits and hyphens.", "type": "string", "pattern": "^[a-z0-9-]+$", "maxLength": 32 },
|
|
26
26
|
"envLabelOrNull": { "description": "Environment label, or null when not set.", "oneOf": [{ "$ref": "#/$defs/envLabel" }, { "type": "null" }] },
|
|
27
|
-
"kind": { "description": "Sample category: 'api' (backend endpoints) or '
|
|
27
|
+
"kind": { "description": "Sample category: 'api' (backend endpoints) or 'step' (test.step durations, 06).", "enum": ["api", "step"] },
|
|
28
28
|
"percentileName": {
|
|
29
29
|
"description": "Percentile name: 'p' followed by a number greater than 0 and less than 100 with at most one decimal, e.g. p50, p95, p99.9.",
|
|
30
30
|
"type": "string",
|
|
31
31
|
"pattern": "^p(?:[1-9][0-9]?)(?:\\.[0-9])?$"
|
|
32
32
|
},
|
|
33
33
|
"key": {
|
|
34
|
-
"description": "Aggregate key: normalized endpoint key (07) or
|
|
34
|
+
"description": "Aggregate key: normalized endpoint key (07) or step key (06). The package limits keys to 2000 UTF-16 code units (07-REQ-18); maxLength here counts code points, so every key the package writes satisfies it.",
|
|
35
35
|
"type": "string",
|
|
36
36
|
"minLength": 1,
|
|
37
37
|
"maxLength": 2000
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
"default": {},
|
|
15
15
|
"properties": {
|
|
16
16
|
"env": {
|
|
17
|
-
"description": "Environment label (D-18). Overridden by PW_PERF_ENV
|
|
17
|
+
"description": "Environment label (D-18). Overridden by PW_PERF_ENV. Null: no label, one set of thresholds files.",
|
|
18
18
|
"$ref": "common.schema.json#/$defs/envLabelOrNull",
|
|
19
19
|
"default": null
|
|
20
20
|
},
|
|
21
|
-
"
|
|
22
|
-
"description": "
|
|
21
|
+
"passes": {
|
|
22
|
+
"description": "Passes of the test command (D-03, D-39): the command runs once per pass and every test runs once in each pass. Overridden by PW_PERF_PASSES for the current mode.",
|
|
23
23
|
"type": "object",
|
|
24
24
|
"additionalProperties": false,
|
|
25
25
|
"default": {},
|
|
26
26
|
"properties": {
|
|
27
27
|
"test": {
|
|
28
|
-
"description": "
|
|
28
|
+
"description": "Passes in a measurement run.",
|
|
29
29
|
"type": "integer",
|
|
30
30
|
"minimum": 1,
|
|
31
31
|
"maximum": 1000,
|
|
32
32
|
"default": 5
|
|
33
33
|
},
|
|
34
34
|
"thresholds": {
|
|
35
|
-
"description": "
|
|
35
|
+
"description": "Passes in a thresholds derivation run.",
|
|
36
36
|
"type": "integer",
|
|
37
37
|
"minimum": 1,
|
|
38
38
|
"maximum": 1000,
|
|
@@ -40,17 +40,22 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
"
|
|
44
|
-
"description": "
|
|
45
|
-
"oneOf": [{"
|
|
46
|
-
"default":
|
|
43
|
+
"grep": {
|
|
44
|
+
"description": "Only tests whose title or tags match this regular expression run in perf mode, e.g. '@perf' (03-REQ-25). Applied case-insensitively to the projects that are measured (all but setup and teardown projects, 04-REQ-18); setup and teardown projects run in full. null: all tests.",
|
|
45
|
+
"oneOf": [{"type": "null"}, {"type": "string", "minLength": 1}],
|
|
46
|
+
"default": null
|
|
47
47
|
},
|
|
48
48
|
"keepReporters": {
|
|
49
|
-
"description": "Reporters kept in perf mode by name, as in the Playwright reporter config (e.g. 'junit', 'allure-playwright'). By default withPerf() keeps only the console reporters (list
|
|
49
|
+
"description": "Reporters kept in perf mode by name, as in the Playwright reporter config (e.g. 'junit', 'allure-playwright'). By default withPerf() keeps only the console reporters line, dot and github (list becomes dot; name list here to keep it) and the package reporter (D-23, 04-REQ-32).",
|
|
50
50
|
"type": "array",
|
|
51
51
|
"uniqueItems": true,
|
|
52
52
|
"items": {"type": "string", "minLength": 1},
|
|
53
53
|
"default": []
|
|
54
|
+
},
|
|
55
|
+
"overrideSlowMo": {
|
|
56
|
+
"description": "Sets use.launchOptions.slowMo to 0 in every measured project in perf mode (03-REQ-27, D-45). slowMo delays every browser action and distorts the measured times; off by default because some tests are unstable without it. false: slowMo stays and perf mode warns about it (CONFIG_SLOW_MO).",
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": false
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
},
|
|
@@ -60,6 +65,11 @@
|
|
|
60
65
|
"additionalProperties": false,
|
|
61
66
|
"default": {},
|
|
62
67
|
"properties": {
|
|
68
|
+
"api": {
|
|
69
|
+
"description": "Requests the browser makes to the backend and calls of the request fixture, page.request and context.request (keys with the prefix 'request '), as keys of kind 'api' (05, 15, 03-REQ-28). false: no request is measured, the api thresholds file is neither read nor written, and only test.step durations are measured; measure.api and measure.steps cannot both be off.",
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"default": true
|
|
72
|
+
},
|
|
63
73
|
"resourceTypes": {
|
|
64
74
|
"description": "Playwright resource types that are measured. WebSocket traffic is not available as Request events in Playwright and cannot be measured (05).",
|
|
65
75
|
"type": "array",
|
|
@@ -134,7 +144,34 @@
|
|
|
134
144
|
"items": {"type": "string", "pattern": "^(?:[1-5]xx|[1-5][0-9]{2})$"},
|
|
135
145
|
"default": ["2xx", "3xx"]
|
|
136
146
|
},
|
|
137
|
-
"
|
|
147
|
+
"steps": {
|
|
148
|
+
"description": "Durations of test.step steps as keys of kind 'step' (06). true (default) enables with defaults, false disables, an object enables with settings (03-REQ-18).",
|
|
149
|
+
"default": true,
|
|
150
|
+
"oneOf": [
|
|
151
|
+
{"type": "boolean"},
|
|
152
|
+
{
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"properties": {
|
|
156
|
+
"enabled": {"description": "Default true when an object is given.", "type": "boolean"},
|
|
157
|
+
"include": {"description": "When not empty, only steps whose step key part matches at least one pattern give samples (06-REQ-22).", "type": "array", "items": {"$ref": "#/$defs/urlPattern"}},
|
|
158
|
+
"exclude": {"description": "Steps whose step key part matches any pattern give no samples; exclude wins over include.", "type": "array", "items": {"$ref": "#/$defs/urlPattern"}},
|
|
159
|
+
"maxDepth": {"description": "Deepest step level measured; deeper steps are included in their ancestor's time (06-REQ-21).", "type": "integer", "minimum": 1, "maximum": 10},
|
|
160
|
+
"categories": {
|
|
161
|
+
"description": "Playwright step categories measured (06-REQ-20). Steps of other categories are transparent for keys and depth.",
|
|
162
|
+
"type": "array",
|
|
163
|
+
"minItems": 1,
|
|
164
|
+
"uniqueItems": true,
|
|
165
|
+
"items": {"enum": ["test.step", "expect", "pw:api", "fixture", "hook"]}
|
|
166
|
+
},
|
|
167
|
+
"groupBy": {"description": "'step': one key per step path across tests; 'test': one key per test and step path (06-REQ-23).", "enum": ["step", "test"]},
|
|
168
|
+
"normalizeTitles": {"description": "false skips the key-stability rules (ids, dates, numbers); privacy rules always apply (06-REQ-35).", "type": "boolean"},
|
|
169
|
+
"redactQuotedValues": {"description": "true replaces quoted values in step titles with :value; by default they stay in keys (06-D-26).", "type": "boolean"}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"pendingTimeoutMs": {
|
|
138
175
|
"description": "How long the collector waits at test end for requests still in flight (05).",
|
|
139
176
|
"type": "integer",
|
|
140
177
|
"minimum": 0,
|
|
@@ -150,9 +187,9 @@
|
|
|
150
187
|
"default": {},
|
|
151
188
|
"properties": {
|
|
152
189
|
"origins": {
|
|
153
|
-
"description": "Origin to label mapping, e.g. {\"https://api.example.com\": \"api\"}. The origin of Playwright use.baseURL gets the empty label unless mapped here. Other origins are labeled with their host.",
|
|
190
|
+
"description": "Origin to label mapping, e.g. {\"https://api.example.com\": \"api\"}. A key with * is a host pattern, e.g. \"https://*.ci.example.com\" (one * per host label, never across a dot); an exact entry wins over a pattern. The origin of Playwright use.baseURL gets the empty label unless mapped here. Other origins are labeled with their host.",
|
|
154
191
|
"type": "object",
|
|
155
|
-
"propertyNames": {"pattern": "^https?://[^/?#]
|
|
192
|
+
"propertyNames": {"pattern": "^(?:https?://[^/?#]+|.*\\*.*)$"},
|
|
156
193
|
"additionalProperties": {"type": "string", "pattern": "^[a-z0-9.-]*$", "maxLength": 64},
|
|
157
194
|
"default": {}
|
|
158
195
|
},
|
|
@@ -175,6 +212,11 @@
|
|
|
175
212
|
"type": "boolean",
|
|
176
213
|
"default": true
|
|
177
214
|
},
|
|
215
|
+
"prefixed": {
|
|
216
|
+
"description": "Ids with a prefix: 2-5 capital letters, '-' and at least 3 digits (ORD-1000), or 1-8 lowercase letters, '_' and at least 2 digits or 8-32 letters and digits with a digit (inv_58) (07-REQ-08).",
|
|
217
|
+
"type": "boolean",
|
|
218
|
+
"default": true
|
|
219
|
+
},
|
|
178
220
|
"email": {"description": "E-mail addresses, replaced with ':email' (07-REQ-08).", "type": "boolean", "default": true}
|
|
179
221
|
}
|
|
180
222
|
},
|
|
@@ -264,7 +306,7 @@
|
|
|
264
306
|
"default": {},
|
|
265
307
|
"properties": {
|
|
266
308
|
"api": {"$ref": "common.schema.json#/$defs/msLimit", "default": 2000},
|
|
267
|
-
"
|
|
309
|
+
"step": {"$ref": "common.schema.json#/$defs/msLimit", "default": 10000}
|
|
268
310
|
}
|
|
269
311
|
}
|
|
270
312
|
}
|
|
@@ -294,7 +336,7 @@
|
|
|
294
336
|
"default": {},
|
|
295
337
|
"properties": {
|
|
296
338
|
"api": {"$ref": "common.schema.json#/$defs/msLimit", "default": 2000},
|
|
297
|
-
"
|
|
339
|
+
"step": {"$ref": "common.schema.json#/$defs/msLimit", "default": 15000}
|
|
298
340
|
}
|
|
299
341
|
},
|
|
300
342
|
"margin": {
|
|
@@ -370,7 +412,7 @@
|
|
|
370
412
|
"default": {},
|
|
371
413
|
"properties": {
|
|
372
414
|
"api": {"$ref": "common.schema.json#/$defs/msLimit", "default": 4000},
|
|
373
|
-
"
|
|
415
|
+
"step": {"$ref": "common.schema.json#/$defs/msLimit", "default": 30000}
|
|
374
416
|
}
|
|
375
417
|
}
|
|
376
418
|
}
|
|
@@ -407,7 +449,7 @@
|
|
|
407
449
|
},
|
|
408
450
|
"default": {"min": 500, "max": 2000, "medianFactor": 2}
|
|
409
451
|
},
|
|
410
|
-
"
|
|
452
|
+
"step": {
|
|
411
453
|
"type": "object",
|
|
412
454
|
"additionalProperties": false,
|
|
413
455
|
"properties": {
|
|
@@ -469,7 +511,7 @@
|
|
|
469
511
|
"default": {},
|
|
470
512
|
"properties": {
|
|
471
513
|
"api": {"$ref": "common.schema.json#/$defs/ratio", "default": 0.85},
|
|
472
|
-
"
|
|
514
|
+
"step": {"$ref": "common.schema.json#/$defs/ratio", "default": 0.85}
|
|
473
515
|
}
|
|
474
516
|
}
|
|
475
517
|
}
|
|
@@ -537,7 +579,7 @@
|
|
|
537
579
|
"default": {},
|
|
538
580
|
"properties": {
|
|
539
581
|
"api": {"$ref": "common.schema.json#/$defs/ratio", "default": 0.05},
|
|
540
|
-
"
|
|
582
|
+
"step": {"$ref": "common.schema.json#/$defs/ratio", "default": 0.05}
|
|
541
583
|
}
|
|
542
584
|
}
|
|
543
585
|
}
|
|
@@ -558,7 +600,7 @@
|
|
|
558
600
|
"default": 5
|
|
559
601
|
},
|
|
560
602
|
"statuses": {
|
|
561
|
-
"description": "Request statuses counted as errors by the 'errors' rule (08, 09): a class like '5xx', an exact code like '429', FAILED (request failed without a response, not aborted), ABORTED (cancelled by the browser, e.g. on navigation), PENDING (still in flight at test end).
|
|
603
|
+
"description": "Request statuses counted as errors by the 'errors' rule (08, 09): a class like '5xx', an exact code like '429', FAILED (request failed without a response, not aborted), ABORTED (cancelled by the browser, e.g. on navigation), PENDING (still in flight at test end).",
|
|
562
604
|
"type": "array",
|
|
563
605
|
"uniqueItems": true,
|
|
564
606
|
"items": {"type": "string", "pattern": "^(?:[1-5]xx|[1-5][0-9]{2}|FAILED|ABORTED|PENDING)$"},
|
|
@@ -571,7 +613,7 @@
|
|
|
571
613
|
"default": {},
|
|
572
614
|
"properties": {
|
|
573
615
|
"api": {"$ref": "common.schema.json#/$defs/ratio", "default": 0.05},
|
|
574
|
-
"
|
|
616
|
+
"step": {"$ref": "common.schema.json#/$defs/ratio", "default": 0.05}
|
|
575
617
|
}
|
|
576
618
|
},
|
|
577
619
|
"margin": {
|
|
@@ -622,7 +664,6 @@
|
|
|
622
664
|
"enum": ["block", "warn"],
|
|
623
665
|
"default": "block"
|
|
624
666
|
},
|
|
625
|
-
"warnOnly": {"description": "Report violations but never fail the run.", "type": "boolean", "default": false},
|
|
626
667
|
"maxFailedTestShare": {
|
|
627
668
|
"description": "Highest share of failed test executions (unexpected / executed, skipped excluded) for which the run result is still trustworthy. Above it the run ends with tool error TESTS_FAILED_TOO_MANY (exit code 3, 09). Failed tests below it are a warning only: in perf mode the performance result decides (00, chapter 11).",
|
|
628
669
|
"type": "number",
|
|
@@ -638,6 +679,11 @@
|
|
|
638
679
|
"additionalProperties": false,
|
|
639
680
|
"default": {},
|
|
640
681
|
"properties": {
|
|
682
|
+
"preset": {
|
|
683
|
+
"description": "Headroom preset for derived thresholds (D-41, 10-REQ-23): sets the defaults of every checks.*.margin; margin fields set explicitly win. strict: small headroom, catches smaller regressions, more false alarms on a noisy environment. normal: recommended start. loose: large headroom, only clear regressions, for shared noisy environments.",
|
|
684
|
+
"enum": ["strict", "normal", "loose"],
|
|
685
|
+
"default": "normal"
|
|
686
|
+
},
|
|
641
687
|
"dir": {
|
|
642
688
|
"description": "Directory of thresholds files, relative to the Playwright config directory.",
|
|
643
689
|
"type": "string",
|
|
@@ -645,10 +691,10 @@
|
|
|
645
691
|
"default": "."
|
|
646
692
|
},
|
|
647
693
|
"filePrefix": {
|
|
648
|
-
"description": "File name prefix; files are <prefix
|
|
694
|
+
"description": "File name prefix; files are <prefix>[.steps][.<env>].json.",
|
|
649
695
|
"type": "string",
|
|
650
696
|
"pattern": "^[A-Za-z0-9._-]+$",
|
|
651
|
-
"default": "perf-thresholds"
|
|
697
|
+
"default": "pw-perf-thresholds"
|
|
652
698
|
},
|
|
653
699
|
"update": {
|
|
654
700
|
"description": "'all': recompute every unlocked complete entry (with hysteresis, 10); 'new-only': add entries for new keys, keep existing ones.",
|
|
@@ -699,10 +745,10 @@
|
|
|
699
745
|
"default": {},
|
|
700
746
|
"properties": {
|
|
701
747
|
"dir": {
|
|
702
|
-
"description": "Directory of report.json and report.html, relative to the Playwright config directory.",
|
|
748
|
+
"description": "Directory of report.json and report.html, relative to the Playwright config directory. Emptied when the first test of a test or thresholds run starts; never the project directory or a folder with thresholds files.",
|
|
703
749
|
"type": "string",
|
|
704
750
|
"minLength": 1,
|
|
705
|
-
"default": "perf
|
|
751
|
+
"default": "reports/pw-perf"
|
|
706
752
|
},
|
|
707
753
|
"html": {"description": "Write the HTML report.", "type": "boolean", "default": true},
|
|
708
754
|
"rawUrls": {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://pkg.invalid/schemas/outcome.schema.json",
|
|
4
4
|
"title": "Outcome file",
|
|
5
|
-
"description": "Small file the reporter writes at the end of onEnd to
|
|
5
|
+
"description": "Small file the reporter writes at the end of onEnd to <report.dir>/outcome.json in test and thresholds modes (04-REQ-62); a CI job reads it. Removed at the start of a run.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["schemaVersion", "runId", "mode", "exitCode", "tests", "evaluation", "toolErrors", "paths"],
|
|
9
9
|
"properties": {
|
|
10
10
|
"schemaVersion": { "const": 1 },
|
|
11
11
|
"runId": { "$ref": "common.schema.json#/$defs/runId" },
|
|
12
|
-
"mode": { "
|
|
12
|
+
"mode": { "description": "Perf mode of the run: test, thresholds or check (02-REQ-34). The run report and thresholds files never have check.", "enum": ["test", "thresholds", "check"] },
|
|
13
13
|
"exitCode": {
|
|
14
14
|
"description": "Exit code the CLI must use, computed by buildOutcome() in core (00, chapter 11; 02-REQ-26): 0 ok, 2 performance violations block the run, 3 tool error or untrustworthy result. Precedence 3 > 2 > 0. Failed tests alone never give a non-zero code in perf mode (gate.maxFailedTestShare, 09-REQ-24); code 1 is reserved and never written. An interrupted or timed-out run without a signal has RUN_INCOMPLETE in toolErrors, so 3; the CLI itself uses 130/143 after a signal it received, regardless of this file (04).",
|
|
15
15
|
"enum": [0, 2, 3]
|