From 9acc790ecb6a8f6481f5617f7d11d3d7d8651201 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 20 Sep 2022 13:55:07 +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=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=8E=87=E8=AE=A1=E7=AE=97=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016931 --user=陈建星 【测试跟踪】报告列表查看测试报告,执行率计算错误 https://www.tapd.cn/55049933/s/1246742 --- .../main/java/io/metersphere/commons/utils/TestPlanUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/commons/utils/TestPlanUtils.java b/backend/src/main/java/io/metersphere/commons/utils/TestPlanUtils.java index a7495651c2..e273164ec2 100644 --- a/backend/src/main/java/io/metersphere/commons/utils/TestPlanUtils.java +++ b/backend/src/main/java/io/metersphere/commons/utils/TestPlanUtils.java @@ -67,7 +67,8 @@ public class TestPlanUtils { report.setCaseCount((report.getCaseCount() == null ? 0 : report.getCaseCount()) + 1); String status = item.getStatus(); if (StringUtils.isNotBlank(status) - && !StringUtils.equalsAny(status, TestPlanTestCaseStatus.Underway.name(), TestPlanTestCaseStatus.Prepare.name())) { + && !StringUtils.equalsAnyIgnoreCase(status, TestPlanTestCaseStatus.Underway.name(), TestPlanTestCaseStatus.Prepare.name(), + ExecuteResult.UN_EXECUTE.getValue(), ExecuteResult.STOP.getValue())) { // 计算执行过的数量 report.setExecuteCount(report.getExecuteCount() + 1); if (StringUtils.equals(successStatus, status)) {