From 15a3227135fee5fe1eaec4a5f895e9c37d5b94ca Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Sat, 22 Jan 2022 14:31:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=AF=AF=E6=8A=A5=E5=BA=93):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=9C=BA=E6=99=AF=E8=B0=83=E8=AF=95=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=A1=B5=E9=9D=A2=E6=B2=A1=E6=9C=89=E8=AF=AF?= =?UTF-8?q?=E6=8A=A5tab=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009861 --user=宋天阳 【接口测试】场景执行结果,没有显示误报tab https://www.tapd.cn/55049933/s/1096145 --- .../api/service/ApiScenarioReportStructureService.java | 9 ++++----- .../api/automation/report/SysnApiReportDetail.vue | 9 +++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) 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 ea51280cdd..5117e8eb85 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java @@ -147,10 +147,10 @@ public class ApiScenarioReportStructureService { */ for (StepTreeDTO step : dtoList) { if (step.getValue() != null) { - if (step.getValue().getError() > 0 || !step.getValue().isSuccess()) { - isError.set(isError.longValue() + 1); - } else if (StringUtils.isNotEmpty(step.getErrorCode())) { + if (StringUtils.isNotEmpty(step.getErrorCode())) { isErrorReport.set(isErrorReport.longValue() + 1); + }else if (step.getValue().getError() > 0 || !step.getValue().isSuccess()) { + isError.set(isError.longValue() + 1); } } else if (CollectionUtils.isNotEmpty(step.getChildren())) { AtomicLong isChildrenError = new AtomicLong(); @@ -175,8 +175,7 @@ public class ApiScenarioReportStructureService { scenarioCalculate(step.getChildren(), error, errorReportCode); if (error.longValue() > 0) { scenarioError.set((scenarioError.longValue() + 1)); - } - if (errorReportCode.longValue() > 0) { + } else if (errorReportCode.longValue() > 0) { errorReport.set((errorReport.longValue() + 1)); } } else if (step.getValue() != null) { diff --git a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue index 391a2eeb7f..09fb6e3bcb 100644 --- a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue @@ -40,6 +40,13 @@ ref="failsTree" /> + + + +