@midscene/core 1.13.2-beta-20260923035443.0 → 1.13.2
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/agent/utils.mjs +1 -1
- package/dist/es/index.mjs +1 -2
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/report-html-template.mjs +1 -1
- package/dist/es/report.mjs +1 -2
- package/dist/es/report.mjs.map +1 -1
- package/dist/es/utils.mjs +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/index.js +29 -36
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/report-html-template.js +1 -1
- package/dist/lib/report.js +3 -10
- package/dist/lib/report.js.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/report.d.ts +0 -1
- package/dist/types/report.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/es/test-run-health.mjs +0 -47
- package/dist/es/test-run-health.mjs.map +0 -1
- package/dist/lib/test-run-health.js +0 -84
- package/dist/lib/test-run-health.js.map +0 -1
- package/dist/types/test-run-health.d.ts +0 -29
- package/dist/types/test-run-health.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-run-health.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../src/test-run-health.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export type TestRunCaseHealthStatus =\n | 'passed'\n | 'retry-passed'\n | 'failed'\n | 'not-run';\n\nexport interface TestRunHealthAttempt {\n attemptIndex: number;\n status: 'success' | 'failed';\n}\n\n/** Minimal Case shape accepted by the shared Test run health calculator. */\nexport interface TestRunHealthCase {\n status: 'success' | 'failed' | 'not-run';\n attempts?: readonly TestRunHealthAttempt[];\n /** The legacy single-attempt representation used by execution outcomes. */\n run?: TestRunHealthAttempt;\n /** Retry evidence owned by a surrounding scope, such as a document retry. */\n retryCount?: number;\n}\n\nexport interface TestRunHealth {\n total: number;\n executed: number;\n passed: number;\n failed: number;\n notRun: number;\n firstPassed: number;\n passedAfterRetry: number;\n finalPassRate: number;\n firstPassRate: number;\n}\n\n/** Classify one logical Case using the retry evidence available to its caller. */\nexport const classifyTestRunCase = (\n testCase: TestRunHealthCase,\n): TestRunCaseHealthStatus => {\n if (testCase.status === 'not-run') return 'not-run';\n if (testCase.status === 'failed') return 'failed';\n const attempts =\n testCase.attempts ?? (testCase.run ? [testCase.run] : ([] as const));\n return (testCase.retryCount ?? 0) > 0 ||\n (attempts.at(-1)?.attemptIndex ?? 0) > 0 ||\n attempts.length > 1 ||\n attempts[0]?.status === 'failed'\n ? 'retry-passed'\n : 'passed';\n};\n\nexport const calculateTestRunHealth = (\n cases: readonly TestRunHealthCase[],\n): TestRunHealth => {\n let passed = 0;\n let failed = 0;\n let notRun = 0;\n let firstPassed = 0;\n let passedAfterRetry = 0;\n\n for (const testCase of cases) {\n switch (classifyTestRunCase(testCase)) {\n case 'passed':\n passed += 1;\n firstPassed += 1;\n break;\n case 'retry-passed':\n passed += 1;\n passedAfterRetry += 1;\n break;\n case 'failed':\n failed += 1;\n break;\n case 'not-run':\n notRun += 1;\n break;\n }\n }\n\n const total = cases.length;\n const executed = total - notRun;\n return {\n total,\n executed,\n passed,\n failed,\n notRun,\n firstPassed,\n passedAfterRetry,\n finalPassRate: executed === 0 ? 0 : passed / executed,\n firstPassRate: executed === 0 ? 0 : firstPassed / executed,\n };\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","classifyTestRunCase","testCase","attempts","calculateTestRunHealth","cases","passed","failed","notRun","firstPassed","passedAfterRetry","total","executed"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;AC4BO,MAAMI,sBAAsB,CACjCC;IAEA,IAAIA,AAAoB,cAApBA,SAAS,MAAM,EAAgB,OAAO;IAC1C,IAAIA,AAAoB,aAApBA,SAAS,MAAM,EAAe,OAAO;IACzC,MAAMC,WACJD,SAAS,QAAQ,IAAKA,CAAAA,SAAS,GAAG,GAAG;QAACA,SAAS,GAAG;KAAC,GAAI,EAAW,AAAV;IAC1D,OAAQA,AAAAA,CAAAA,SAAS,UAAU,IAAI,KAAK,KACjCC,AAAAA,CAAAA,SAAS,EAAE,CAAC,KAAK,gBAAgB,KAAK,KACvCA,SAAS,MAAM,GAAG,KAClBA,QAAQ,CAAC,EAAE,EAAE,WAAW,WACtB,iBACA;AACN;AAEO,MAAMC,yBAAyB,CACpCC;IAEA,IAAIC,SAAS;IACb,IAAIC,SAAS;IACb,IAAIC,SAAS;IACb,IAAIC,cAAc;IAClB,IAAIC,mBAAmB;IAEvB,KAAK,MAAMR,YAAYG,MACrB,OAAQJ,oBAAoBC;QAC1B,KAAK;YACHI,UAAU;YACVG,eAAe;YACf;QACF,KAAK;YACHH,UAAU;YACVI,oBAAoB;YACpB;QACF,KAAK;YACHH,UAAU;YACV;QACF,KAAK;YACHC,UAAU;YACV;IACJ;IAGF,MAAMG,QAAQN,MAAM,MAAM;IAC1B,MAAMO,WAAWD,QAAQH;IACzB,OAAO;QACLG;QACAC;QACAN;QACAC;QACAC;QACAC;QACAC;QACA,eAAeE,AAAa,MAAbA,WAAiB,IAAIN,SAASM;QAC7C,eAAeA,AAAa,MAAbA,WAAiB,IAAIH,cAAcG;IACpD;AACF"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export type TestRunCaseHealthStatus = 'passed' | 'retry-passed' | 'failed' | 'not-run';
|
|
2
|
-
export interface TestRunHealthAttempt {
|
|
3
|
-
attemptIndex: number;
|
|
4
|
-
status: 'success' | 'failed';
|
|
5
|
-
}
|
|
6
|
-
/** Minimal Case shape accepted by the shared Test run health calculator. */
|
|
7
|
-
export interface TestRunHealthCase {
|
|
8
|
-
status: 'success' | 'failed' | 'not-run';
|
|
9
|
-
attempts?: readonly TestRunHealthAttempt[];
|
|
10
|
-
/** The legacy single-attempt representation used by execution outcomes. */
|
|
11
|
-
run?: TestRunHealthAttempt;
|
|
12
|
-
/** Retry evidence owned by a surrounding scope, such as a document retry. */
|
|
13
|
-
retryCount?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface TestRunHealth {
|
|
16
|
-
total: number;
|
|
17
|
-
executed: number;
|
|
18
|
-
passed: number;
|
|
19
|
-
failed: number;
|
|
20
|
-
notRun: number;
|
|
21
|
-
firstPassed: number;
|
|
22
|
-
passedAfterRetry: number;
|
|
23
|
-
finalPassRate: number;
|
|
24
|
-
firstPassRate: number;
|
|
25
|
-
}
|
|
26
|
-
/** Classify one logical Case using the retry evidence available to its caller. */
|
|
27
|
-
export declare const classifyTestRunCase: (testCase: TestRunHealthCase) => TestRunCaseHealthStatus;
|
|
28
|
-
export declare const calculateTestRunHealth: (cases: readonly TestRunHealthCase[]) => TestRunHealth;
|
|
29
|
-
//# sourceMappingURL=test-run-health.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-run-health.d.ts","sourceRoot":"","sources":["../../src/test-run-health.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAC/B,QAAQ,GACR,cAAc,GACd,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC9B;AAED,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3C,2EAA2E;IAC3E,GAAG,CAAC,EAAE,oBAAoB,CAAC;IAC3B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,GAC9B,UAAU,iBAAiB,KAC1B,uBAWF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,OAAO,SAAS,iBAAiB,EAAE,KAClC,aAuCF,CAAC"}
|