refactor(测试计划): 执行测试计划时去掉重复的方法调用

This commit is contained in:
CaptainB 2022-10-10 16:23:05 +08:00 committed by 刘瑞斌
parent 230d86c8fa
commit f45e15f025
1 changed files with 7 additions and 6 deletions

View File

@ -366,6 +366,7 @@ public class TestPlanService {
/** /**
* 出现异常不回滚继续计算其他 * 出现异常不回滚继续计算其他
*
* @param planId * @param planId
* @return * @return
*/ */
@ -1410,7 +1411,7 @@ public class TestPlanService {
public String runPlan(TestPlanRunRequest testplanRunRequest) { public String runPlan(TestPlanRunRequest testplanRunRequest) {
//检查测试计划下有没有可以执行的用例 //检查测试计划下有没有可以执行的用例
if (!haveExecCase(testplanRunRequest.getTestPlanId()) && !haveUiCase(testplanRunRequest.getTestPlanId())) { if (!haveExecCase(testplanRunRequest.getTestPlanId())) {
MSException.throwException(Translator.get("plan_warning")); MSException.throwException(Translator.get("plan_warning"));
} }
String envType = testplanRunRequest.getEnvironmentType(); String envType = testplanRunRequest.getEnvironmentType();
@ -1637,7 +1638,7 @@ public class TestPlanService {
append.append("/"); append.append("/");
} }
} }
if (!haveExecCase(planList.get(i).getId()) && !haveUiCase(planList.get(i).getId())) { if (!haveExecCase(planList.get(i).getId())) {
haveExecCaseBuilder.append(planList.get(i).getName()).append("; "); haveExecCaseBuilder.append(planList.get(i).getName()).append("; ");
} }
} }