fix(接口测试): 修复case不选择环境无法批量执行的缺陷 (#11570)

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
metersphere-bot 2022-03-17 14:58:53 +08:00 committed by GitHub
parent fe548f7aa9
commit 10b3b8500d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import io.metersphere.service.EnvironmentGroupProjectService;
import io.metersphere.utils.LoggerUtil; import io.metersphere.utils.LoggerUtil;
import org.apache.commons.beanutils.BeanComparator; import org.apache.commons.beanutils.BeanComparator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.collections4.comparators.FixedOrderComparator; import org.apache.commons.collections4.comparators.FixedOrderComparator;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject; import org.json.JSONObject;
@ -205,7 +206,9 @@ public class ApiCaseExecuteService {
List<ApiTestCaseWithBLOBs> caseList = apiTestCaseMapper.selectByExampleWithBLOBs(example); List<ApiTestCaseWithBLOBs> caseList = apiTestCaseMapper.selectByExampleWithBLOBs(example);
LoggerUtil.debug("查询到执行数据:" + caseList.size()); LoggerUtil.debug("查询到执行数据:" + caseList.size());
// 环境检查 // 环境检查
this.checkEnv(caseList); if (MapUtils.isEmpty(request.getConfig().getEnvMap())) {
this.checkEnv(caseList);
}
// 集合报告设置 // 集合报告设置
String serialReportId = null; String serialReportId = null;
if (StringUtils.equals(request.getConfig().getReportType(), RunModeConstants.SET_REPORT.toString()) if (StringUtils.equals(request.getConfig().getReportType(), RunModeConstants.SET_REPORT.toString())