diff --git a/frontend/src/models/testPlan/testPlanReport.ts b/frontend/src/models/testPlan/testPlanReport.ts index 2b019c8371..4f6d2071d2 100644 --- a/frontend/src/models/testPlan/testPlanReport.ts +++ b/frontend/src/models/testPlan/testPlanReport.ts @@ -36,6 +36,7 @@ export interface PlanReportDetail { testPlanName: string; resultStatus?: string; // 报告结果 defaultLayout: boolean; // 报告布局 + children?: PlanReportDetail[]; // 计划组子计划数据 } export type detailCountKey = 'functionalCount' | 'apiCaseCount' | 'apiScenarioCount'; diff --git a/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue b/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue index 43b2d363da..abaff23a42 100644 --- a/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue +++ b/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue @@ -106,18 +106,23 @@ // 通过率 const allSuccessCount = (allSuccessCase / allCaseTotal) * 100; const allSuccessRate = `${Number.isNaN(allSuccessCount) ? 0 : allSuccessCount.toFixed(2)}`; - + // TODO 待联调 if (props.isPlanGroup) { - return `
${props.detail.testPlanName}包含 ${props.detail.planCount}个子计划。 - 其中 ${props.detail.passCountOfPlan} 个子计划通过, ${props.detail.failCountOfPlan} 个子计划不通过。
`; + let summaryDesc = `${props.detail.testPlanName} 包含 ${props.detail.planCount} 个子计划。 其中 ${props.detail.passCountOfPlan} 个子计划通过, ${props.detail.failCountOfPlan} 个子计划不通过; + 包含功能测试、接口用例、场景用例, 共 ${allCaseTotal} 条用例,已执行 ${allHasExecutedCase} 条,通过用例 ${allSuccessCase} 条,通过率为 ${allSuccessRate} %;共关联缺陷 ${props.detail.bugCount} 个
`; + (props.detail?.children || []).forEach((item) => { + const content = `▪ ${item.testPlanName}子计划,包含功能测试、接口用例、场景用例, 共 ${item.caseTotal} 条用例,已执行 ${item.executeCount} 条,通过用例 ${item.passCountOfPlan} 条,通过率为 ${item.passThreshold} %,未达到通过阈值(通过阈值为${item.passThreshold}%)
`; + summaryDesc += content; + }); + return summaryDesc; } - const functionalCasText = `▪ 本次测试包含${functionalCaseDetail.caseTotal}条功能测试用例,执行了${functionalCaseDetail.hasExecutedCase}条,未执行${functionalCaseDetail.pending}条,执行率为${functionalCaseDetail.apiExecutedRate},通过用例${functionalCaseDetail.success}条,通过率为${functionalCaseDetail.successRate}。共发现缺陷${props.detail.functionalBugCount}个。