diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java index 4d9e3fdf3c..2c000f5134 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/MsThreadGroup.java @@ -63,7 +63,9 @@ public class MsThreadGroup extends MsTestElement { boolean isConnScenarioPost = false; //获取projectConfig String projectId = this.checkProjectId(hashTree); - this.checkEnvironmentConfig(projectId,config,hashTree); + if(StringUtils.isNotEmpty(projectId)){ + this.checkEnvironmentConfig(projectId,config,hashTree); + } if (config.getConfig() != null) { if (config.isEffective(projectId)) { EnvironmentConfig environmentConfig = config.getConfig().get(projectId); diff --git a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java index 94c2a2b572..d6ccb9c1bd 100644 --- a/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java +++ b/backend/src/main/java/io/metersphere/api/exec/scenario/ApiScenarioSerialService.java @@ -173,6 +173,7 @@ public class ApiScenarioSerialService { MsThreadGroup group = new MsThreadGroup(); group.setLabel(caseWithBLOBs.getName()); group.setName(caseWithBLOBs.getName()); + group.setProjectId(caseWithBLOBs.getProjectId()); MsTestElement testElement = parse(caseWithBLOBs, testId, envId); group.setHashTree(new LinkedList<>()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java index 5117e8eb85..67011b650c 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java @@ -228,6 +228,9 @@ public class ApiScenarioReportStructureService { if (StringUtils.isNotEmpty(dto.getType()) && requests.contains(dto.getType()) && dto.getValue() == null) { RequestResultExpandDTO requestResultExpandDTO = new RequestResultExpandDTO(); requestResultExpandDTO.setStatus("unexecute"); + if(StringUtils.equalsAnyIgnoreCase(dto.getType(),"AbstractSampler")){ + requestResultExpandDTO.setSuccess(true); + } requestResultExpandDTO.setName(dto.getLabel()); dto.setValue(requestResultExpandDTO); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml index d599aa2d21..380c3dbf25 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanApiCaseMapper.xml @@ -279,6 +279,7 @@ from test_plan_api_case where test_plan_id = #{planId} + AND api_case_id in (SELECT id FROM api_test_case WHERE (`status` is null or `status` != 'Trash')) select pc.id as id, - pc.executor, pc.status, - pc.update_time, - pc.plan_id as planId, - t.name, t.priority, - t.type, t.node_id, - t.steps, t.prerequisite, - t.remark, - t.id as caseId, - t.node_path, t.method, t.num, t.step_model, t.expected_result, t.step_description + pc.executor, pc.status, + pc.update_time, + pc.plan_id as planId, + t.name, t.priority, + t.type, t.node_id, + t.steps, t.prerequisite, + t.remark, + t.id as caseId, + t.node_path, t.method, t.num, t.step_model, t.expected_result, t.step_description from test_plan_test_case pc inner join test_case t on pc.case_id = t.id @@ -492,7 +494,9 @@ select tptc.id, tptc.status from test_plan_test_case tptc - inner join test_case tc - on tc.id = tptc.case_id and tc.status != 'Trash' + inner join test_case tc + on tc.id = tptc.case_id and tc.status != 'Trash' where tptc.plan_id = #{planId}; @@ -556,10 +560,14 @@