fix(场景报告): 修复场景报告状态优先级,存在失败的步骤优先按照失败处理

--bug=1009844 --user=宋天阳
【误报库】-添加误报后,执行场景后结果中有失败和误报的场景,报告中显示误报,应该是失败优先级最高
https://www.tapd.cn/55049933/s/1096280
This commit is contained in:
song-tianyang 2022-01-22 16:04:31 +08:00 committed by xiaomeinvG
parent addd047158
commit ad270b2785
1 changed files with 4 additions and 2 deletions

View File

@ -731,10 +731,12 @@ public class ApiScenarioReportService {
}
}
String status;//增加误报状态判断
if(errorReportResultSize > 0){
if(errorSize > 0){
status = ScenarioStatus.Error.name();
}else if(errorReportResultSize > 0){
status = ExecuteResult.errorReportResult.name();
}else {
status =errorSize > 0 || requestResults.isEmpty() ? ScenarioStatus.Error.name() : ScenarioStatus.Success.name();
status = ScenarioStatus.Success.name();
}
if (dto != null && dto.getArbitraryData() != null && dto.getArbitraryData().containsKey("TIMEOUT") && (Boolean) dto.getArbitraryData().get("TIMEOUT")) {