fix(接口测试): 场景批量转性能测试时增加场景环境校验
--bug=1027141 --user=宋天阳 【接口测试】场景列表-批量操作- 批量创建性能测试-场景未配置环境-跳转到创建性能测试页面-无场景数据 https://www.tapd.cn/55049933/s/1386870
This commit is contained in:
parent
9fb103641d
commit
358bbc0d56
|
@ -1721,7 +1721,7 @@ public class ApiScenarioService {
|
|||
return ApiFileUtil.listBytesToZip(files);
|
||||
}
|
||||
|
||||
private void checkExportEnv(List<ApiScenarioWithBLOBs> scenarios) {
|
||||
private void checkExportEnv(List<? extends ApiScenarioWithBLOBs> scenarios) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (ApiScenarioWithBLOBs apiScenarioWithBLOBs : scenarios) {
|
||||
try {
|
||||
|
@ -1966,9 +1966,10 @@ public class ApiScenarioService {
|
|||
|
||||
List<String> ids = request.getIds();
|
||||
List<ApiScenarioDTO> apiScenarioList = extApiScenarioMapper.selectIds(ids);
|
||||
//检查运行环境
|
||||
checkExportEnv(apiScenarioList);
|
||||
if (CollectionUtils.isEmpty(apiScenarioList)) {
|
||||
returnDTO.setScenarioJmxList(new ArrayList<>());
|
||||
return returnDTO;
|
||||
} else {
|
||||
Map<String, List<String>> projectEnvironments = apiScenarioEnvService.selectApiScenarioEnv(apiScenarioList);
|
||||
apiScenarioList.forEach(item -> {
|
||||
|
@ -1986,8 +1987,8 @@ public class ApiScenarioService {
|
|||
returnDTO.setProjectEnvMap(projectEnvironments);
|
||||
}
|
||||
returnDTO.setJmxInfoDTOList(jmxInfoList);
|
||||
return returnDTO;
|
||||
}
|
||||
return returnDTO;
|
||||
}
|
||||
|
||||
public void batchCopy(ApiScenarioBatchRequest request) {
|
||||
|
|
Loading…
Reference in New Issue