@midscene/test 1.13.2 → 1.13.4-beta-20260924030824.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/dist/es/1~214.mjs +7 -5
- package/dist/es/1~214.mjs.map +1 -1
- package/dist/es/cli/index.mjs +25 -6
- package/dist/es/cli/index.mjs.map +1 -1
- package/dist/es/test-cli.mjs +26 -9
- package/dist/es/test-cli.mjs.map +1 -1
- package/dist/lib/0~160.js +7 -5
- package/dist/lib/0~160.js.map +1 -1
- package/dist/lib/cli/index.js +24 -5
- package/dist/lib/cli/index.js.map +1 -1
- package/dist/lib/test-cli.js +25 -8
- package/dist/lib/test-cli.js.map +1 -1
- package/dist/types/cli/index.d.ts +3 -0
- package/package.json +13 -13
package/dist/es/test-cli.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { JSON_SCHEMA, load } from "js-yaml";
|
|
|
10
10
|
import { createHash, randomUUID } from "node:crypto";
|
|
11
11
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
12
12
|
import { setMaxListeners } from "node:events";
|
|
13
|
-
import { TestRunReportAssembler } from "@midscene/core/report";
|
|
13
|
+
import { TestRunReportAssembler, calculateTestRunHealth } from "@midscene/core/report";
|
|
14
14
|
import { getDebug } from "@midscene/shared/logger";
|
|
15
15
|
var __webpack_modules__ = {
|
|
16
16
|
"node:fs" (module) {
|
|
@@ -20,9 +20,7 @@ var __webpack_modules__ = {
|
|
|
20
20
|
module.exports = __rspack_external_node_path_c5b9b54f;
|
|
21
21
|
},
|
|
22
22
|
"./package.json" (module) {
|
|
23
|
-
module.exports = {
|
|
24
|
-
rE: "1.13.2"
|
|
25
|
-
};
|
|
23
|
+
module.exports = JSON.parse('{"rE":"1.13.4-beta-20260924030824.0"}');
|
|
26
24
|
}
|
|
27
25
|
};
|
|
28
26
|
var __webpack_module_cache__ = {};
|
|
@@ -1221,13 +1219,32 @@ const asNotRun = (documentId, collectedCase, projectName, reason)=>({
|
|
|
1221
1219
|
notRunReason: reason
|
|
1222
1220
|
});
|
|
1223
1221
|
const summarize = (projects)=>{
|
|
1224
|
-
const
|
|
1222
|
+
const healthCases = projects.flatMap((project)=>{
|
|
1223
|
+
const documentAttemptByRunId = new Map(project.documents.map((document)=>[
|
|
1224
|
+
document.documentRunId,
|
|
1225
|
+
document.attemptIndex ?? 0
|
|
1226
|
+
]));
|
|
1227
|
+
return latestById(project.cases, (item)=>item.caseId).map((item)=>({
|
|
1228
|
+
status: item.status,
|
|
1229
|
+
...item.run ? {
|
|
1230
|
+
run: item.run
|
|
1231
|
+
} : {},
|
|
1232
|
+
...item.attempts ? {
|
|
1233
|
+
attempts: item.attempts
|
|
1234
|
+
} : {},
|
|
1235
|
+
retryCount: item.documentRunId ? documentAttemptByRunId.get(item.documentRunId) ?? 0 : 0
|
|
1236
|
+
}));
|
|
1237
|
+
});
|
|
1225
1238
|
const documents = projects.flatMap((project)=>latestById(project.documents, (item)=>item.documentId));
|
|
1239
|
+
const health = calculateTestRunHealth(healthCases);
|
|
1226
1240
|
return {
|
|
1227
|
-
total:
|
|
1228
|
-
passed:
|
|
1229
|
-
failed:
|
|
1230
|
-
notRun:
|
|
1241
|
+
total: health.total,
|
|
1242
|
+
passed: health.passed,
|
|
1243
|
+
failed: health.failed,
|
|
1244
|
+
notRun: health.notRun,
|
|
1245
|
+
passedAfterRetry: health.passedAfterRetry,
|
|
1246
|
+
finalPassRate: health.finalPassRate,
|
|
1247
|
+
firstPassRate: health.firstPassRate,
|
|
1231
1248
|
filtered: projects.reduce((total, project)=>total + project.filteredCaseCount, 0),
|
|
1232
1249
|
collectionErrors: projects.reduce((total, project)=>total + project.collectionErrors.length, 0),
|
|
1233
1250
|
documentFailures: documents.filter((document)=>'failed' === document.status).length,
|