diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java index 771d3001f0..c25edc387f 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanReportDetailResponse.java @@ -9,6 +9,9 @@ import lombok.Data; @Data public class TestPlanReportDetailResponse { + /** + * 基础报告详情信息 + */ @Schema(description = "报告ID") private String id; @Schema(description = "报告名称") @@ -21,6 +24,8 @@ public class TestPlanReportDetailResponse { private Long endTime; @Schema(description = "报告内容") private String summary; + @Schema(description = "用例总数") + private Integer caseTotal = 0; /** * 报告分析 @@ -39,6 +44,18 @@ public class TestPlanReportDetailResponse { @Schema(description = "计划总数") private Integer planCount; + /** + * 执行分析面板 + */ + @Schema(description = "执行分析-用例数") + private CaseCount executeCount; + @Schema(description = "功能用例分析-用例数") + private CaseCount functionalCount; + @Schema(description = "接口用例分析-用例数") + private CaseCount apiCaseCount; + @Schema(description = "接口场景用例分析-用例数") + private CaseCount apiScenarioCount; + /** * 一键总结参数 */ @@ -48,39 +65,16 @@ public class TestPlanReportDetailResponse { private Integer failCountOfPlan = 0; @Schema(description = "功能用例明细的缺陷数量") private Integer functionalBugCount = 0; - @Schema(description = "功能用例明细的缺陷数量") + @Schema(description = "接口用例明细的缺陷数量") private Integer apiBugCount = 0; - @Schema(description = "功能用例明细的缺陷数量") + @Schema(description = "场景用例明细的缺陷数量") private Integer scenarioBugCount = 0; - - @Schema(description = "用例总数") - private Integer caseTotal = 0; - /** - * 执行分析 + * 报告明细列表 参数 */ - @Schema(description = "执行分析-用例数") - private CaseCount executeCount; - /** - * 功能用例分析 - */ - @Schema(description = "功能用例分析-用例数") - private CaseCount functionalCount; - /** - * 接口用例分析 - */ - @Schema(description = "接口用例分析-用例数") - private CaseCount apiCaseCount; - /** - * 接口场景用例分析 - */ - @Schema(description = "接口场景用例分析-用例数") - private CaseCount apiScenarioCount; - @Schema(description = "报告是否删除") private boolean deleted; - @Schema(description = "报告状态") private String resultStatus; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java index 0c81dba76d..504717a2a8 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanReportService.java @@ -302,7 +302,7 @@ public class TestPlanReportService { report.setCreateUser(currentUser); report.setCreateTime(System.currentTimeMillis()); report.setDeleted(false); - report.setPassThreshold(config.getPassThreshold()); + report.setPassThreshold(config == null ? null : config.getPassThreshold()); report.setParentId(genParam.getGroupReportId()); testPlanReportMapper.insertSelective(report);