fix(测试跟踪): 禁用本地执行后只有UI测试不做校验

--bug=1020120 --user=赵勇 【UI测试】禁用本地执行资源池-测试计划-只关联了UI用例-执行计划提示“请选择资源池” https://www.tapd.cn/55049933/s/1308808
This commit is contained in:
fit2-zhao 2022-11-30 18:19:37 +08:00 committed by CaptainB
parent f58f8c10fa
commit 5aa0003eb8
1 changed files with 6 additions and 4 deletions

View File

@ -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());