fix(测试计划): 报告用例明细列表展示问题
This commit is contained in:
parent
ae1b6ddb02
commit
27cb8d9475
|
@ -28,6 +28,12 @@ public class TestPlanReportDetailResponse {
|
||||||
private String summary;
|
private String summary;
|
||||||
@Schema(description = "用例总数")
|
@Schema(description = "用例总数")
|
||||||
private Integer caseTotal;
|
private Integer caseTotal;
|
||||||
|
@Schema(description = "功能用例总数")
|
||||||
|
private Integer functionalTotal;
|
||||||
|
@Schema(description = "接口用例总数")
|
||||||
|
private Integer apiCaseTotal;
|
||||||
|
@Schema(description = "接口场景用例总数")
|
||||||
|
private Integer apiScenarioTotal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报告分析
|
* 报告分析
|
||||||
|
|
|
@ -621,8 +621,12 @@ public class TestPlanReportService {
|
||||||
TestPlanReportSummary reportSummary = testPlanReportSummaries.getFirst();
|
TestPlanReportSummary reportSummary = testPlanReportSummaries.getFirst();
|
||||||
TestPlanReportDetailResponse planReportDetail = new TestPlanReportDetailResponse();
|
TestPlanReportDetailResponse planReportDetail = new TestPlanReportDetailResponse();
|
||||||
BeanUtils.copyBean(planReportDetail, planReport);
|
BeanUtils.copyBean(planReportDetail, planReport);
|
||||||
|
// 用例总数需单独返回, 不然前端表格不展示, 影响执行中的数据
|
||||||
int caseTotal = (int) (reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount());
|
int caseTotal = (int) (reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount());
|
||||||
planReportDetail.setCaseTotal(caseTotal);
|
planReportDetail.setCaseTotal(caseTotal);
|
||||||
|
planReportDetail.setFunctionalTotal(reportSummary.getFunctionalCaseCount().intValue());
|
||||||
|
planReportDetail.setApiCaseTotal(reportSummary.getApiCaseCount().intValue());
|
||||||
|
planReportDetail.setApiScenarioTotal(reportSummary.getApiScenarioCount().intValue());
|
||||||
planReportDetail.setBugCount(reportSummary.getBugCount().intValue());
|
planReportDetail.setBugCount(reportSummary.getBugCount().intValue());
|
||||||
// 暂时只有功能用例能关联缺陷
|
// 暂时只有功能用例能关联缺陷
|
||||||
Long functionalBugCount = extTestPlanReportFunctionalCaseMapper.countBug(reportId);
|
Long functionalBugCount = extTestPlanReportFunctionalCaseMapper.countBug(reportId);
|
||||||
|
|
|
@ -81,6 +81,9 @@ export const defaultReportDetail: PlanReportDetail = {
|
||||||
executeRate: 0, // 执行完成率
|
executeRate: 0, // 执行完成率
|
||||||
bugCount: 0,
|
bugCount: 0,
|
||||||
caseTotal: 0,
|
caseTotal: 0,
|
||||||
|
functionalTotal: 0,
|
||||||
|
apiCaseTotal: 0,
|
||||||
|
apiScenarioTotal: 0,
|
||||||
executeCount: cloneDeep(defaultCount),
|
executeCount: cloneDeep(defaultCount),
|
||||||
functionalCount: cloneDeep(defaultCount),
|
functionalCount: cloneDeep(defaultCount),
|
||||||
apiCaseCount: cloneDeep(defaultCount),
|
apiCaseCount: cloneDeep(defaultCount),
|
||||||
|
|
|
@ -20,6 +20,9 @@ export interface PlanReportDetail {
|
||||||
executeRate: number; // 执行完成率
|
executeRate: number; // 执行完成率
|
||||||
bugCount: number;
|
bugCount: number;
|
||||||
caseTotal: number;
|
caseTotal: number;
|
||||||
|
functionalTotal: number;
|
||||||
|
apiCaseTotal: number;
|
||||||
|
apiScenarioTotal: number;
|
||||||
executeCount: countDetail;
|
executeCount: countDetail;
|
||||||
functionalCount: countDetail;
|
functionalCount: countDetail;
|
||||||
apiCaseCount: countDetail; // 接口场景用例分析-用例数
|
apiCaseCount: countDetail; // 接口场景用例分析-用例数
|
||||||
|
|
|
@ -106,6 +106,9 @@ const subPlanList: PlanReportDetail = {
|
||||||
endTime: 0,
|
endTime: 0,
|
||||||
summary: '',
|
summary: '',
|
||||||
caseTotal: 1,
|
caseTotal: 1,
|
||||||
|
functionalTotal: 0,
|
||||||
|
apiCaseTotal: 0,
|
||||||
|
apiScenarioTotal: 0,
|
||||||
passThreshold: 100,
|
passThreshold: 100,
|
||||||
passRate: 100,
|
passRate: 100,
|
||||||
executeRate: 0,
|
executeRate: 0,
|
||||||
|
|
|
@ -422,9 +422,9 @@
|
||||||
const apiScenarioDetail = getSummaryDetail(detail.value.apiScenarioCount || defaultCount);
|
const apiScenarioDetail = getSummaryDetail(detail.value.apiScenarioCount || defaultCount);
|
||||||
return apiScenarioDetail.successRate;
|
return apiScenarioDetail.successRate;
|
||||||
});
|
});
|
||||||
const functionalCaseTotal = computed(() => getSummaryDetail(detail.value.functionalCount).caseTotal);
|
const functionalCaseTotal = computed(() => detail.value.functionalTotal);
|
||||||
const apiCaseTotal = computed(() => getSummaryDetail(detail.value.apiCaseCount).caseTotal);
|
const apiCaseTotal = computed(() => detail.value.apiCaseTotal);
|
||||||
const scenarioCaseTotal = computed(() => getSummaryDetail(detail.value.apiScenarioCount).caseTotal);
|
const scenarioCaseTotal = computed(() => detail.value.apiScenarioTotal);
|
||||||
|
|
||||||
const reportAnalysisList = computed<ReportMetricsItemModel[]>(() => {
|
const reportAnalysisList = computed<ReportMetricsItemModel[]>(() => {
|
||||||
if (props.isGroup) {
|
if (props.isGroup) {
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
executeRate: 100, // 执行完成率
|
executeRate: 100, // 执行完成率
|
||||||
bugCount: 10,
|
bugCount: 10,
|
||||||
caseTotal: 0,
|
caseTotal: 0,
|
||||||
|
functionalTotal: 0,
|
||||||
|
apiCaseTotal: 0,
|
||||||
|
apiScenarioTotal: 0,
|
||||||
executeCount: {
|
executeCount: {
|
||||||
success: 0,
|
success: 0,
|
||||||
error: 0,
|
error: 0,
|
||||||
|
|
Loading…
Reference in New Issue