fix(测试跟踪): 优化执行测试计划时无可执行资源的测试计划处理方式
优化执行测试计划时无可执行资源的测试计划处理方式
This commit is contained in:
parent
80d1232323
commit
27b173791a
|
@ -2,7 +2,6 @@ package io.metersphere.plan.service;
|
|||
|
||||
import io.metersphere.base.domain.TestPlanWithBLOBs;
|
||||
import io.metersphere.base.mapper.TestPlanMapper;
|
||||
import io.metersphere.commons.constants.TestPlanReportStatus;
|
||||
import io.metersphere.commons.utils.JSON;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.constants.RunModeConstants;
|
||||
|
@ -199,7 +198,7 @@ public class TestPlanExecuteService {
|
|||
testPlanReportService.createTestPlanReportContentReportIds(planReportId, apiTestCases, scenarioCases, uiScenarios, loadCaseReportMap);
|
||||
if (!haveApiCaseExec && !haveScenarioCaseExec && !haveLoadCaseExec && !haveUICaseExec) {
|
||||
//如果没有执行的自动化用例,调用结束测试计划的方法。 因为方法中包含着测试计划执行队列的处理逻辑。
|
||||
testPlanReportService.testPlanExecuteOver(planReportId, TestPlanReportStatus.COMPLETED.name());
|
||||
testPlanReportService.testPlanUnExecute(reportInfoDTO.getTestPlanReport());
|
||||
}
|
||||
return planReportId;
|
||||
}
|
||||
|
|
|
@ -605,6 +605,18 @@ public class TestPlanReportService {
|
|||
}
|
||||
}
|
||||
|
||||
public void testPlanUnExecute(TestPlanReport testPlanReport) {
|
||||
if (testPlanReport != null && !StringUtils.equalsIgnoreCase(testPlanReport.getStatus(), TestPlanReportStatus.COMPLETED.name())) {
|
||||
testPlanReport.setIsApiCaseExecuting(false);
|
||||
testPlanReport.setIsScenarioExecuting(false);
|
||||
testPlanReport.setIsPerformanceExecuting(false);
|
||||
testPlanReport.setIsUiScenarioExecuting(false);
|
||||
testPlanReport.setStatus(TestPlanReportStatus.COMPLETED.name());
|
||||
testPlanReportMapper.updateByPrimaryKey(testPlanReport);
|
||||
this.executeTestPlanByQueue(testPlanReport.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试计划报告设置最终执行状态
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue