feat(测试计划): 测试计划报告一键总结功能补充
This commit is contained in:
parent
1f64a7e300
commit
9716dd5712
|
@ -15,10 +15,12 @@
|
|||
</template>
|
||||
<template #lastReportStatus="{ record }">
|
||||
<ExecutionStatus
|
||||
v-if="record.lastReportStatus !== 'PENDING'"
|
||||
:module-type="ReportEnum.API_REPORT"
|
||||
:status="record.lastReportStatus"
|
||||
:class="[!record.lastReportId ? '' : 'cursor-pointer']"
|
||||
/>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
<template #[FilterSlotNameEnum.CASE_MANAGEMENT_CASE_LEVEL]="{ filterContent }">
|
||||
<CaseLevel :case-level="filterContent.value" />
|
||||
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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[] = [
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -95,13 +95,13 @@
|
|||
// TODO 待联调
|
||||
if (props.isPlanGroup) {
|
||||
return `<p style=""><span color="" fontsize=""> <strong>${props.detail.name}</strong>包含 ${props.detail.planCount}个子计划。
|
||||
其中 X 个子计划通过, X 个子计划不通过。</span></p>`;
|
||||
其中 ${props.detail.passCountOfPlan} 个子计划通过, ${props.detail.failCountOfPlan} 个子计划不通过。</span></p>`;
|
||||
}
|
||||
// 接口用例通过率
|
||||
return `<p style=""><span color="" fontsize=""> <strong>${props.detail.name}</strong> 包含功能测试、接口用例、场景用例, 共 ${allCaseTotal}条用例,已执行 ${allHasExecutedCase} 条,通过用例 ${allSuccessCase} 条,通过率为 ${allSuccessRate},达到/未达到通过阈值(通过阈值为${props.detail.passThreshold}%),<strong>${props.detail.name}</strong> 计划满足/不满足发布要求。<br>
|
||||
(1)本次测试包含${functionalCaseDetail.caseTotal}条功能测试用例,执行了${functionalCaseDetail.hasExecutedCase}条,未执行${functionalCaseDetail.pending}条,执行率为${functionalCaseDetail.apiExecutedRate},通过用例${functionalCaseDetail.success}条,通过率为${functionalCaseDetail.successRate}。共发现缺陷0个。<br>
|
||||
(2)本次测试包含${apiCaseDetail.caseTotal}条接口测试用例,执行了${apiCaseDetail.hasExecutedCase}条,未执行${apiCaseDetail.pending}条,执行率为${apiCaseDetail.apiExecutedRate},通过用例${apiCaseDetail.success}条,通过率为${apiCaseDetail.successRate}。共发现缺陷 ${props.detail.bugCount} 个。<br>
|
||||
(3)本次测试包含${apiScenarioDetail.caseTotal}条场景测试用例,执行了${apiScenarioDetail.hasExecutedCase}条,未执行${apiScenarioDetail.pending}条,执行率为${apiScenarioDetail.apiExecutedRate}%,通过用例${apiScenarioDetail.success}条,通过率为${apiScenarioDetail.successRate}。共发现缺陷0个</span></p>
|
||||
(1)本次测试包含${functionalCaseDetail.caseTotal}条功能测试用例,执行了${functionalCaseDetail.hasExecutedCase}条,未执行${functionalCaseDetail.pending}条,执行率为${functionalCaseDetail.apiExecutedRate},通过用例${functionalCaseDetail.success}条,通过率为${functionalCaseDetail.successRate}。共发现缺陷${props.detail.functionalBugCount}个。<br>
|
||||
(2)本次测试包含${apiCaseDetail.caseTotal}条接口测试用例,执行了${apiCaseDetail.hasExecutedCase}条,未执行${apiCaseDetail.pending}条,执行率为${apiCaseDetail.apiExecutedRate},通过用例${apiCaseDetail.success}条,通过率为${apiCaseDetail.successRate}。共发现缺陷 ${props.detail.apiBugCount} 个。<br>
|
||||
(3)本次测试包含${apiScenarioDetail.caseTotal}条场景测试用例,执行了${apiScenarioDetail.hasExecutedCase}条,未执行${apiScenarioDetail.pending}条,执行率为${apiScenarioDetail.apiExecutedRate}%,通过用例${apiScenarioDetail.success}条,通过率为${apiScenarioDetail.successRate}。共发现缺陷${props.detail.scenarioBugCount}个</span></p>
|
||||
`;
|
||||
});
|
||||
|
||||
|
|
|
@ -718,7 +718,7 @@
|
|||
|
||||
const defaultCountDetailMap = ref<Record<string, PassRateCountDetail>>({});
|
||||
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 =
|
||||
|
|
Loading…
Reference in New Issue