From 9716dd57127fd56dda99d3ada891cbd4baa35ebd Mon Sep 17 00:00:00 2001
From: "xinxin.wu"
Date: Sat, 15 Jun 2024 18:24:04 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E4=B8=80?=
=?UTF-8?q?=E9=94=AE=E6=80=BB=E7=BB=93=E5=8A=9F=E8=83=BD=E8=A1=A5=E5=85=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/ms-associate-case/apiCaseTable.vue | 4 ++++
frontend/src/config/testPlan.ts | 5 +++++
frontend/src/models/testPlan/testPlanReport.ts | 5 +++++
.../views/test-plan/report/detail/component/summary.vue | 8 ++++----
.../src/views/test-plan/testPlan/components/planTable.vue | 4 ++--
5 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue
index eaa5ba0bb4..c59fe93648 100644
--- a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue
+++ b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue
@@ -15,10 +15,12 @@
+ -
@@ -80,6 +82,7 @@
keyword: string;
getPageApiType: keyof typeof CasePageApiTypeEnum; // 获取未关联分页Api
extraTableParams?: TableQueryParams; // 查询表格的额外参数
+ protocols: string[];
}>();
const emit = defineEmits<{
@@ -215,6 +218,7 @@
condition: {
keyword: props.keyword,
},
+ protocols: props.protocols,
...props.extraTableParams,
};
}
diff --git a/frontend/src/config/testPlan.ts b/frontend/src/config/testPlan.ts
index d8370f5495..62ae47332a 100644
--- a/frontend/src/config/testPlan.ts
+++ b/frontend/src/config/testPlan.ts
@@ -83,6 +83,11 @@ export const defaultReportDetail: PlanReportDetail = {
apiCaseCount: cloneDeep(defaultCount),
apiScenarioCount: cloneDeep(defaultCount),
planCount: 0,
+ passCountOfPlan: 0, // 计划通过数量
+ failCountOfPlan: 0, // 计划未通过数量
+ functionalBugCount: 0, // 用例明细bug总数
+ apiBugCount: 0, // 接口用例明细bug总数
+ scenarioBugCount: 0, // 场景用例明细bug总数
};
export const statusConfig: StatusListType[] = [
diff --git a/frontend/src/models/testPlan/testPlanReport.ts b/frontend/src/models/testPlan/testPlanReport.ts
index 02fb5acbb6..fe54b6021b 100644
--- a/frontend/src/models/testPlan/testPlanReport.ts
+++ b/frontend/src/models/testPlan/testPlanReport.ts
@@ -22,6 +22,11 @@ export interface PlanReportDetail {
apiCaseCount: countDetail; // 接口场景用例分析-用例数
apiScenarioCount: countDetail; // 接口场景用例分析-用例数
planCount: number;
+ passCountOfPlan: number; // 计划通过数量
+ failCountOfPlan: number; // 计划未通过数量
+ functionalBugCount: number; // 用例明细bug总数
+ apiBugCount: number; // 接口用例明细bug总数
+ scenarioBugCount: number; // 场景用例明细bug总数
}
export type AnalysisType = 'FUNCTIONAL' | 'API' | 'SCENARIO';
diff --git a/frontend/src/views/test-plan/report/detail/component/summary.vue b/frontend/src/views/test-plan/report/detail/component/summary.vue
index 7804b577c8..89e38c526f 100644
--- a/frontend/src/views/test-plan/report/detail/component/summary.vue
+++ b/frontend/src/views/test-plan/report/detail/component/summary.vue
@@ -95,13 +95,13 @@
// TODO 待联调
if (props.isPlanGroup) {
return ` ${props.detail.name}包含 ${props.detail.planCount}个子计划。
- 其中 X 个子计划通过, X 个子计划不通过。
`;
+ 其中 ${props.detail.passCountOfPlan} 个子计划通过, ${props.detail.failCountOfPlan} 个子计划不通过。
`;
}
// 接口用例通过率
return ` ${props.detail.name} 包含功能测试、接口用例、场景用例, 共 ${allCaseTotal}条用例,已执行 ${allHasExecutedCase} 条,通过用例 ${allSuccessCase} 条,通过率为 ${allSuccessRate},达到/未达到通过阈值(通过阈值为${props.detail.passThreshold}%),${props.detail.name} 计划满足/不满足发布要求。
- (1)本次测试包含${functionalCaseDetail.caseTotal}条功能测试用例,执行了${functionalCaseDetail.hasExecutedCase}条,未执行${functionalCaseDetail.pending}条,执行率为${functionalCaseDetail.apiExecutedRate},通过用例${functionalCaseDetail.success}条,通过率为${functionalCaseDetail.successRate}。共发现缺陷0个。
- (2)本次测试包含${apiCaseDetail.caseTotal}条接口测试用例,执行了${apiCaseDetail.hasExecutedCase}条,未执行${apiCaseDetail.pending}条,执行率为${apiCaseDetail.apiExecutedRate},通过用例${apiCaseDetail.success}条,通过率为${apiCaseDetail.successRate}。共发现缺陷 ${props.detail.bugCount} 个。
- (3)本次测试包含${apiScenarioDetail.caseTotal}条场景测试用例,执行了${apiScenarioDetail.hasExecutedCase}条,未执行${apiScenarioDetail.pending}条,执行率为${apiScenarioDetail.apiExecutedRate}%,通过用例${apiScenarioDetail.success}条,通过率为${apiScenarioDetail.successRate}。共发现缺陷0个
+ (1)本次测试包含${functionalCaseDetail.caseTotal}条功能测试用例,执行了${functionalCaseDetail.hasExecutedCase}条,未执行${functionalCaseDetail.pending}条,执行率为${functionalCaseDetail.apiExecutedRate},通过用例${functionalCaseDetail.success}条,通过率为${functionalCaseDetail.successRate}。共发现缺陷${props.detail.functionalBugCount}个。
+ (2)本次测试包含${apiCaseDetail.caseTotal}条接口测试用例,执行了${apiCaseDetail.hasExecutedCase}条,未执行${apiCaseDetail.pending}条,执行率为${apiCaseDetail.apiExecutedRate},通过用例${apiCaseDetail.success}条,通过率为${apiCaseDetail.successRate}。共发现缺陷 ${props.detail.apiBugCount} 个。
+ (3)本次测试包含${apiScenarioDetail.caseTotal}条场景测试用例,执行了${apiScenarioDetail.hasExecutedCase}条,未执行${apiScenarioDetail.pending}条,执行率为${apiScenarioDetail.apiExecutedRate}%,通过用例${apiScenarioDetail.success}条,通过率为${apiScenarioDetail.successRate}。共发现缺陷${props.detail.scenarioBugCount}个
`;
});
diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue
index d02fa514fd..425fd553c6 100644
--- a/frontend/src/views/test-plan/testPlan/components/planTable.vue
+++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue
@@ -718,7 +718,7 @@
const defaultCountDetailMap = ref>({});
function getFunctionalCount(id: string) {
- return defaultCountDetailMap.value[id]?.functionalCaseCount ?? 0;
+ return defaultCountDetailMap.value[id]?.caseTotal ?? 0;
}
function getSchedule(id: string) {
return !!defaultCountDetailMap.value[id]?.scheduleConfig;
@@ -729,7 +729,7 @@
function getMoreActions(record: TestPlanItem) {
const { status: planStatus } = record;
- const useCount = defaultCountDetailMap.value[record.id]?.functionalCaseCount ?? 0;
+ const useCount = defaultCountDetailMap.value[record.id]?.caseTotal ?? 0;
// 有用例数量才可以执行 否则不展示执行
const copyAction =