From 5aa0003eb8485b2a82e45fa1e802a2354c1d42cf Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 30 Nov 2022 18:19:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E6=9C=AC=E5=9C=B0=E6=89=A7=E8=A1=8C=E5=90=8E?= =?UTF-8?q?=E5=8F=AA=E6=9C=89UI=E6=B5=8B=E8=AF=95=E4=B8=8D=E5=81=9A?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1020120 --user=赵勇 【UI测试】禁用本地执行资源池-测试计划-只关联了UI用例-执行计划提示“请选择资源池” https://www.tapd.cn/55049933/s/1308808 --- .../io/metersphere/plan/service/TestPlanService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 56bf64431e..66702c34aa 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 @@ -73,7 +73,6 @@ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.*; -import java.util.function.BiConsumer; import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -841,7 +840,9 @@ public class TestPlanService { if (planReportId == null) { planReportId = UUID.randomUUID().toString(); } - this.verifyPool(projectId, runModeConfig); + if (haveExecCase(testPlanId, true)) { + this.verifyPool(projectId, runModeConfig); + } //创建测试报告,然后返回的ID重新赋值为resourceID,作为后续的参数 TestPlanScheduleReportInfoDTO reportInfoDTO = this.genTestPlanReport(planReportId, testPlanId, userId, triggerMode, runModeConfig); //定时任务执行重新设置实际开始时间 @@ -1800,8 +1801,9 @@ public class TestPlanService { //创建测试报告 RunModeConfigDTO runModeConfigDTO = JSON.parseObject(testPlan.getRunModeConfig(), RunModeConfigDTO.class); runModeConfigDTO = ObjectUtils.isEmpty(runModeConfigDTO) ? new RunModeConfigDTO() : runModeConfigDTO; - this.verifyPool(testPlan.getProjectId(), runModeConfigDTO); - + if (haveExecCase(testPlan.getId(), true)) { + this.verifyPool(testPlan.getProjectId(), runModeConfigDTO); + } this.genTestPlanReport(planReportId, testPlan.getId(), request.getUserId(), request.getTriggerMode(), runModeConfigDTO); //测试计划准备执行,取消测试计划的实际结束时间 extTestPlanMapper.updateActualEndTimeIsNullById(testPlan.getId());