feat(接口测试): 修复场景报告中含有执行失败的dubbo组件时不展示dubbo组件的问题

--bug=1012669 --user=宋天阳
【接口测试】-场景中包含dubbo协议的api或case-调试生成报告中没有dubbo协议的结果
https://www.tapd.cn/55049933/s/1146411
This commit is contained in:
song-tianyang 2022-04-25 15:32:37 +08:00 committed by TIanyang
parent d2021973fa
commit ef33aa45bf
1 changed files with 8 additions and 7 deletions

View File

@ -381,7 +381,8 @@ public class ApiScenarioReportStructureService {
try { try {
if (dtoList.stream().filter(e -> e.getValue() != null && ElementUtil.requests.contains(e.getType())).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 List<StepTreeDTO> unList = dtoList.stream().filter(e -> e.getValue() != null
&& StringUtils.equalsIgnoreCase(e.getTotalStatus(), ExecuteResult.unexecute.name())).collect(Collectors.toList()); && ((StringUtils.equalsIgnoreCase(e.getType(), "DubboSampler") && e.getValue().getStartTime() == 0) || StringUtils.equalsIgnoreCase(e.getTotalStatus(), ExecuteResult.unexecute.name())))
.collect(Collectors.toList());
List<StepTreeDTO> list = dtoList.stream().filter(e -> e.getValue().getStartTime() != 0).collect(Collectors.toList()); List<StepTreeDTO> list = dtoList.stream().filter(e -> e.getValue().getStartTime() != 0).collect(Collectors.toList());
list = list.stream().sorted(Comparator.comparing(x -> x.getValue().getStartTime())).collect(Collectors.toList()); list = list.stream().sorted(Comparator.comparing(x -> x.getValue().getStartTime())).collect(Collectors.toList());
unList = unList.stream().sorted(Comparator.comparing(x -> x.getIndex())).collect(Collectors.toList()); unList = unList.stream().sorted(Comparator.comparing(x -> x.getIndex())).collect(Collectors.toList());