fix(测试跟踪): 优化执行测试计划时无可执行资源的测试计划处理方式
优化执行测试计划时无可执行资源的测试计划处理方式
This commit is contained in:
parent
976f6025c1
commit
7adf575d74
|
@ -3,7 +3,6 @@ package io.metersphere.plan.service;
|
|||
import io.metersphere.base.domain.TestPlanWithBLOBs;
|
||||
import io.metersphere.base.mapper.TestPlanMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanMapper;
|
||||
import io.metersphere.commons.constants.TestPlanReportStatus;
|
||||
import io.metersphere.commons.utils.JSON;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.constants.RunModeConstants;
|
||||
|
@ -208,7 +207,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;
|
||||
}
|
||||
|
|
|
@ -599,6 +599,18 @@ public class TestPlanReportService {
|
|||
}
|
||||
}
|
||||
|
||||
public void testPlanUnExecute(TestPlanReport testPlanReport) {
|
||||
if (testPlanReport != null) {
|
||||
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