mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 03:28:59 +08:00
refactor(UI自动化): 失败重试日志打印优化
This commit is contained in:
parent
da140013c2
commit
ec07e6f5e1
@ -987,6 +987,7 @@ public class ApiScenarioReportService {
|
|||||||
*/
|
*/
|
||||||
private long getUiErrorSize(ResultDTO dto) {
|
private long getUiErrorSize(ResultDTO dto) {
|
||||||
int errorSize = 0;
|
int errorSize = 0;
|
||||||
|
int successSize = 0;
|
||||||
try {
|
try {
|
||||||
boolean success;
|
boolean success;
|
||||||
String processType;
|
String processType;
|
||||||
@ -1007,12 +1008,17 @@ public class ApiScenarioReportService {
|
|||||||
cmdName = Optional.ofNullable(stepResult.getString("cmdName")).orElse("");
|
cmdName = Optional.ofNullable(stepResult.getString("cmdName")).orElse("");
|
||||||
if (!success && (StringUtils.equalsIgnoreCase("MAIN", processType) || cmdName.startsWith("verify") || cmdName.startsWith("assert"))) {
|
if (!success && (StringUtils.equalsIgnoreCase("MAIN", processType) || cmdName.startsWith("verify") || cmdName.startsWith("assert"))) {
|
||||||
errorSize++;
|
errorSize++;
|
||||||
|
} else {
|
||||||
|
successSize++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
errorSize = 1;
|
errorSize = 1;
|
||||||
}
|
}
|
||||||
|
if (successSize == 0 && errorSize == 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return errorSize;
|
return errorSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user