From 9770f48b5ccf73f0858c6bd301f7488f8839db2b Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Wed, 18 Oct 2023 16:17:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E7=BC=96=E8=BE=91=E6=97=B6?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E8=8A=82=E7=82=B9=E7=9A=84=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B1=A0=E7=8A=B6=E6=80=81=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1032092 --user=宋天阳 【性能测试】测试-编辑-压力配置-固定节点前未显示刷新按钮 https://www.tapd.cn/55049933/s/1427880;--bug=1032095 --user=宋天阳 【性能测试】测试-编辑-压力配置-固定节点和自定义节点-空闲状态显示红色 https://www.tapd.cn/55049933/s/1427881 --- .../test/components/PerformancePressureConfig.vue | 10 +++++++--- .../io/metersphere/plan/service/TestPlanService.java | 10 +++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/performance-test/frontend/src/business/test/components/PerformancePressureConfig.vue b/performance-test/frontend/src/business/test/components/PerformancePressureConfig.vue index bc1dd6cf14..10d9fa9457 100644 --- a/performance-test/frontend/src/business/test/components/PerformancePressureConfig.vue +++ b/performance-test/frontend/src/business/test/components/PerformancePressureConfig.vue @@ -214,7 +214,11 @@
- + + +
+ style="color:#89DB7E;background-color: #FFFFFF;border-color: #89DB7E;margin-left: 5px;margin-right: 5px"> {{ $t("commons.idle") }} + style="color:#E5594B;background-color: #FFFFFF;border-color: #E5594B;margin-left: 5px;margin-right: 5px"> {{ $t("commons.running") }} diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index b0045531a0..4855ca1c3b 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -1781,9 +1781,9 @@ public class TestPlanService { } issuesService.calculateReportByIssueList(testPlanCaseReportResultDTO.getIssueList(), report); - DecimalFormat rateFormat = new DecimalFormat("#0.00"); - rateFormat.setMinimumFractionDigits(2); - rateFormat.setMaximumFractionDigits(2); + DecimalFormat rateFormat = new DecimalFormat("#0.0000"); + rateFormat.setMinimumFractionDigits(4); + rateFormat.setMaximumFractionDigits(4); if (report.getExecuteCount() != 0 && report.getCaseCount() != null) { double executeRate = Double.parseDouble(rateFormat.format((double) report.getExecuteCount() / (double) report.getCaseCount())); @@ -1793,7 +1793,7 @@ public class TestPlanService { report.setExecuteRate(executeRate); } } else { - report.setExecuteRate(0.00); + report.setExecuteRate(0.0000); } if (report.getPassCount() != 0 && report.getCaseCount() != null) { double passRate = Double.parseDouble(rateFormat.format((double) report.getPassCount() / (double) report.getCaseCount())); @@ -1803,7 +1803,7 @@ public class TestPlanService { report.setPassRate(passRate); } } else { - report.setPassRate(0.00); + report.setPassRate(0.0000); } report.setName(testPlan.getName());