fix(测试计划): 修复测试计划状态不准确
This commit is contained in:
parent
f09d1e7416
commit
dc96a9affa
|
@ -104,6 +104,8 @@ public class TestPlanService {
|
|||
private ExtTestPlanApiCaseMapper extTestPlanApiCaseMapper;
|
||||
@Resource
|
||||
private ExtTestPlanLoadCaseMapper extTestPlanLoadCaseMapper;
|
||||
@Resource
|
||||
private ExtTestPlanScenarioCaseMapper extTestPlanScenarioCaseMapper;
|
||||
|
||||
public synchronized void addTestPlan(AddTestPlanRequest testPlan) {
|
||||
if (getTestPlanByName(testPlan.getName()).size() > 0) {
|
||||
|
@ -602,6 +604,14 @@ public class TestPlanService {
|
|||
}
|
||||
}
|
||||
|
||||
// test-plan-scenario-case status
|
||||
List<String> scenarioStatusList = extTestPlanScenarioCaseMapper.getExecResultByPlanId(planId);
|
||||
for (String scenarioStatus : scenarioStatusList) {
|
||||
if (scenarioStatus == null) {
|
||||
return TestPlanStatus.Underway.name();
|
||||
}
|
||||
}
|
||||
|
||||
// test-plan-load-case status
|
||||
List<String> loadStatusList = extTestPlanLoadCaseMapper.getStatusByTestPlanId(planId);
|
||||
for (String loadStatus : loadStatusList) {
|
||||
|
|
Loading…
Reference in New Issue