refactor(UI自动化): 失败重试日志打印优化

This commit is contained in:
zhangdahai112 2022-09-16 18:40:37 +08:00 committed by f2c-ci-robot[bot]
parent da140013c2
commit ec07e6f5e1
1 changed files with 6 additions and 0 deletions

View File

@ -987,6 +987,7 @@ public class ApiScenarioReportService {
*/
private long getUiErrorSize(ResultDTO dto) {
int errorSize = 0;
int successSize = 0;
try {
boolean success;
String processType;
@ -1007,12 +1008,17 @@ public class ApiScenarioReportService {
cmdName = Optional.ofNullable(stepResult.getString("cmdName")).orElse("");
if (!success && (StringUtils.equalsIgnoreCase("MAIN", processType) || cmdName.startsWith("verify") || cmdName.startsWith("assert"))) {
errorSize++;
} else {
successSize++;
}
}
}
} catch (Exception e) {
errorSize = 1;
}
if (successSize == 0 && errorSize == 0) {
return 1;
}
return errorSize;
}