fix(接口测试): 解决导入接口运行生成报告问题
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016692
This commit is contained in:
parent
4b036fa8c3
commit
bd9078b4e8
|
@ -286,7 +286,7 @@ public class ApiCaseExecuteService {
|
||||||
request.setConfig(new RunModeConfigDTO());
|
request.setConfig(new RunModeConfigDTO());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.equals("GROUP", request.getConfig().getEnvironmentType()) && StringUtils.isNotEmpty(request.getConfig().getEnvironmentGroupId())) {
|
if (StringUtils.equals(EnvironmentType.GROUP.toString(), request.getConfig().getEnvironmentType()) && StringUtils.isNotEmpty(request.getConfig().getEnvironmentGroupId())) {
|
||||||
request.getConfig().setEnvMap(environmentGroupProjectService.getEnvMap(request.getConfig().getEnvironmentGroupId()));
|
request.getConfig().setEnvMap(environmentGroupProjectService.getEnvMap(request.getConfig().getEnvironmentGroupId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,10 +294,7 @@ public class ApiCaseExecuteService {
|
||||||
(query) -> extApiTestCaseMapper.selectIdsByQuery((ApiTestCaseRequest) query));
|
(query) -> extApiTestCaseMapper.selectIdsByQuery((ApiTestCaseRequest) query));
|
||||||
|
|
||||||
List<MsExecResponseDTO> responseDTOS = new LinkedList<>();
|
List<MsExecResponseDTO> responseDTOS = new LinkedList<>();
|
||||||
|
List<ApiTestCaseWithBLOBs> caseList = extApiTestCaseMapper.unTrashCaseListByIds(request.getIds());
|
||||||
ApiTestCaseExample example = new ApiTestCaseExample();
|
|
||||||
example.createCriteria().andIdIn(request.getIds()).andStatusNotEqualTo("Trash");
|
|
||||||
List<ApiTestCaseWithBLOBs> caseList = apiTestCaseMapper.selectByExampleWithBLOBs(example);
|
|
||||||
LoggerUtil.debug("查询到执行数据:" + caseList.size());
|
LoggerUtil.debug("查询到执行数据:" + caseList.size());
|
||||||
Map<String, List<String>> testCaseEnvMap = new HashMap<>();
|
Map<String, List<String>> testCaseEnvMap = new HashMap<>();
|
||||||
// 环境检查
|
// 环境检查
|
||||||
|
|
|
@ -999,6 +999,8 @@ public class ApiDefinitionService {
|
||||||
apiTestCaseWithBLOBs.setPriority("P0");
|
apiTestCaseWithBLOBs.setPriority("P0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apiTestCaseWithBLOBs.setStatus("");
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(apiTestCaseWithBLOBs.getId())) {
|
if (StringUtils.isNotBlank(apiTestCaseWithBLOBs.getId())) {
|
||||||
BeanUtils.copyBean(apiTestCaseDTO, apiTestCaseWithBLOBs);
|
BeanUtils.copyBean(apiTestCaseDTO, apiTestCaseWithBLOBs);
|
||||||
apiTestCaseDTO.setUpdated(true);
|
apiTestCaseDTO.setUpdated(true);
|
||||||
|
|
|
@ -16,6 +16,8 @@ public interface ExtApiTestCaseMapper {
|
||||||
|
|
||||||
List<ApiTestCaseWithBLOBs> caseList(@Param("request") ApiTestCaseRequest request);
|
List<ApiTestCaseWithBLOBs> caseList(@Param("request") ApiTestCaseRequest request);
|
||||||
|
|
||||||
|
List<ApiTestCaseWithBLOBs> unTrashCaseListByIds(@Param("ids") List<String> ids);
|
||||||
|
|
||||||
List<ApiTestCaseDTO> listSimple(@Param("request") ApiTestCaseRequest request);
|
List<ApiTestCaseDTO> listSimple(@Param("request") ApiTestCaseRequest request);
|
||||||
|
|
||||||
List<String> selectIdsNotExistsInPlan(@Param("projectId") String projectId, @Param("planId") String planId);
|
List<String> selectIdsNotExistsInPlan(@Param("projectId") String projectId, @Param("planId") String planId);
|
||||||
|
|
|
@ -1008,4 +1008,14 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="unTrashCaseListByIds" resultType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||||
|
SELECT * FROM api_test_case
|
||||||
|
<where>
|
||||||
|
(api_test_case.status IS NULL OR api_test_case.status != 'Trash')
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="ids" item="v" separator="," open="(" close=")">
|
||||||
|
#{v}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue