fix(接口测试): 修复场景测试生成报告步骤顺序不正确的缺陷
--bug=1010641 --user=王孝刚 【接口自动化】github#11021-场景-测试生成报告步骤顺序不正确 https://www.tapd.cn/55049933/s/1110783
This commit is contained in:
parent
82ba1b944a
commit
14247811ce
|
@ -245,9 +245,7 @@ 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);
|
||||
}
|
||||
|
@ -270,7 +268,7 @@ public class ApiScenarioReportStructureService {
|
|||
}
|
||||
// 循环步骤请求从新排序
|
||||
if (dtoList.stream().filter(e -> e.getValue() != null).collect(Collectors.toList()).size() == dtoList.size()) {
|
||||
List<StepTreeDTO> list = dtoList.stream().sorted(Comparator.comparing(x -> x.getValue().getStartTime())).collect(Collectors.toList());
|
||||
List<StepTreeDTO> list = dtoList.stream().sorted(Comparator.comparing(x -> x.getAllIndex())).collect(Collectors.toList());
|
||||
for (int index = 0; index < list.size(); index++) {
|
||||
list.get(index).setIndex((index + 1));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue