fix(接口测试): 修复场景报告解析if控制器失败的问题

修复场景报告解析if控制器失败的问题
This commit is contained in:
song-tianyang 2022-04-11 11:29:36 +08:00 committed by CountryBuilder
parent d6ff275a32
commit bd293b69d7
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import io.metersphere.api.dto.ApiScenarioReportDTO;
import io.metersphere.api.dto.RequestResultExpandDTO;
import io.metersphere.api.dto.StepTreeDTO;
import io.metersphere.api.dto.definition.request.ElementUtil;
import io.metersphere.api.service.vo.ApiDefinitionExecResultVo;
import io.metersphere.base.domain.*;
import io.metersphere.base.mapper.*;
@ -393,7 +394,7 @@ public class ApiScenarioReportStructureService {
}
// 循环步骤请求从新排序
try {
if (dtoList.stream().filter(e -> e.getValue() != null).collect(Collectors.toList()).size() == dtoList.size()) {
if (dtoList.stream().filter(e -> e.getValue() != null && ElementUtil.requests.contains(e.getType())).collect(Collectors.toList()).size() == dtoList.size()) {
List<StepTreeDTO> unList = dtoList.stream().filter(e -> e.getValue() != null
&& StringUtils.equalsIgnoreCase(e.getTotalStatus(), ExecuteResult.unexecute.name())).collect(Collectors.toList());
List<StepTreeDTO> list = dtoList.stream().filter(e -> e.getValue().getStartTime() != 0).collect(Collectors.toList());