test(web): enforce one-pass smoke execution
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
- 第一轮全部按计划执行一次;失败项记录在 `tests/golden/WBV2/feature-smoke-report.json`。
|
- 第一轮全部按计划执行一次;失败项记录在 `tests/golden/WBV2/feature-smoke-report.json`。
|
||||||
- 失败项标记为 `FAILED_FOCUSED_FIX_REQUIRED`,不伪造通过,也不在同一轮重复执行。
|
- 失败项标记为 `FAILED_FOCUSED_FIX_REQUIRED`,不伪造通过,也不在同一轮重复执行。
|
||||||
- 修复必须建立新的聚焦任务和新的烟测批次;已通过功能不重跑。
|
- 修复必须建立新的聚焦任务和新的烟测批次;已通过功能不重跑。
|
||||||
|
- 同一 `planId` 已存在尝试记录时,运行器会拒绝再次执行;必须更换批次 ID 或使用独立的聚焦修复入口。
|
||||||
|
|
||||||
## 执行命令
|
## 执行命令
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"planDocument": {
|
"planDocument": {
|
||||||
"path": "docs/WEB_FEATURE_SMOKE_PLAN.md",
|
"path": "docs/WEB_FEATURE_SMOKE_PLAN.md",
|
||||||
"sha256": "d3f6391efa860c7f9be2bbd5ff4ff9dad8477b1e92cd7c9d618743a0cfbe92ec"
|
"sha256": "fd3f4966351051b8feb518c898a9f9cfdf9bcfbbca17194ca41098256cabc65b"
|
||||||
},
|
},
|
||||||
"summary": {
|
"summary": {
|
||||||
"totalFeatures": 34,
|
"totalFeatures": 34,
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ if (!execute) {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fs.existsSync(reportPath)) {
|
||||||
|
const previous = JSON.parse(fs.readFileSync(reportPath, "utf8"));
|
||||||
|
if (previous.planId === plan.planId && Array.isArray(previous.cases) && previous.cases.some((item) => Number(item.attempts ?? 0) > 0)) {
|
||||||
|
process.stderr.write(`feature-smoke-once-only: plan ${plan.planId} already has recorded attempts; create a new focused-fix batch instead of rerunning\n`);
|
||||||
|
process.exit(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const startedAt = new Date().toISOString();
|
const startedAt = new Date().toISOString();
|
||||||
const smokeReport = {
|
const smokeReport = {
|
||||||
schemaVersion: 1,
|
schemaVersion: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user