From d49cfaa559df5d10d48450761af64ed86d4531c2 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 17 Mar 2022 13:32:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E9=87=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AA=E6=89=A7=E8=A1=8C=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 测试计划报告里增加未执行步骤统计 --- .../api/service/ApiScenarioReportStructureService.java | 2 +- .../io/metersphere/track/dto/TestPlanScenarioStepCountDTO.java | 1 + .../metersphere/track/service/TestPlanScenarioCaseService.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java index 977464ab35..4369e2aca7 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java @@ -395,7 +395,7 @@ public class ApiScenarioReportStructureService { AtomicLong stepErrorCode = new AtomicLong(); AtomicLong stepUnExecute = new AtomicLong(); calculateStep(stepList, stepError, stepTotal, stepErrorCode, stepUnExecute, false); - reportDTO.setScenarioStepSuccess((stepTotal.longValue() - stepError.longValue() - stepErrorCode.longValue())); + reportDTO.setScenarioStepSuccess((stepTotal.longValue() - stepError.longValue() - stepErrorCode.longValue() -stepUnExecute.longValue())); reportDTO.setScenarioStepTotal(stepTotal.longValue()); reportDTO.setScenarioStepError(stepError.longValue()); reportDTO.setScenarioStepErrorReport(stepErrorCode.longValue()); diff --git a/backend/src/main/java/io/metersphere/track/dto/TestPlanScenarioStepCountDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestPlanScenarioStepCountDTO.java index 2b40e63523..c6177e59dd 100644 --- a/backend/src/main/java/io/metersphere/track/dto/TestPlanScenarioStepCountDTO.java +++ b/backend/src/main/java/io/metersphere/track/dto/TestPlanScenarioStepCountDTO.java @@ -15,5 +15,6 @@ public class TestPlanScenarioStepCountDTO { private int scenarioStepErrorReport; private List underwayIds = new ArrayList<>(); private int scenarioStepUnderway; + private int scenarioStepUnExecute; } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java index ba3208cbcb..a3968425de 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java @@ -495,6 +495,7 @@ public class TestPlanScenarioCaseService { stepCount.setScenarioStepSuccess(stepCount.getScenarioStepSuccess() + jsonObject.getIntValue("scenarioStepSuccess")); stepCount.setScenarioStepError(stepCount.getScenarioStepError() + jsonObject.getIntValue("scenarioStepError")); stepCount.setScenarioStepErrorReport(stepCount.getScenarioStepErrorReport() + jsonObject.getIntValue("scenarioStepErrorReport")); + stepCount.setScenarioStepUnExecute(stepCount.getScenarioStepUnExecute() + jsonObject.getIntValue("scenarioStepUnExecuteReport")); } } } else {