From d6afeefae2d3448e21318a46ff5ebe20ddb7228b Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 22 Sep 2022 10:25:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E9=A6=96=E9=A1=B5=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E9=80=9A=E8=BF=87=E7=8E=87=E7=BB=9F=E8=AE=A1=E9=94=99?= =?UTF-8?q?=E8=AF=AF=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=1017123 --user=宋天阳 【接口测试】接口测试首页接口用例数量通过率统计错误 https://www.tapd.cn/55049933/s/1249668 --- .../java/io/metersphere/api/controller/APITestController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/controller/APITestController.java b/backend/src/main/java/io/metersphere/api/controller/APITestController.java index 316c4da679..a12460dc16 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APITestController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APITestController.java @@ -251,7 +251,7 @@ public class APITestController { if (unexecuteCount + executionFailedCount + executionPassCount + fakeErrorCount > 0) { //通过率 - float coverageRageNumber = (float) executionPassCount * 100 / (unexecuteCount + executedCountNumber + executionPassCount); + float coverageRageNumber = (float) executionPassCount * 100 / (unexecuteCount + executionFailedCount + fakeErrorCount + executionPassCount); DecimalFormat df = new DecimalFormat("0.0"); apiCountResult.setPassRage(df.format(coverageRageNumber) + "%"); } else {