fix(接口定义): 场景报告时间错误

--bug=1009179 --user=王孝刚 【测试跟踪】jenkin执行测试计划,时间显示异常
https://www.tapd.cn/55049933/s/1086082
This commit is contained in:
wxg0103 2021-12-23 14:28:02 +08:00 committed by fit2-zhao
parent a8514fb774
commit 8b5f9a1804
1 changed files with 5 additions and 1 deletions

View File

@ -132,7 +132,11 @@ public class ApiScenarioReportStructureService {
scenarioError.set((scenarioError.longValue() + 1));
}
} else if (step.getValue() != null) {
totalTime.set((totalTime.longValue() + (step.getValue().getEndTime() - step.getValue().getStartTime())));
if (step.getValue().getStartTime() == 0 || step.getValue().getEndTime() == 0) {
totalTime.set(totalTime.longValue() + 0);
} else {
totalTime.set((totalTime.longValue() + (step.getValue().getEndTime() - step.getValue().getStartTime())));
}
}
if (CollectionUtils.isNotEmpty(step.getChildren())) {
calculate(step.getChildren(), totalScenario, scenarioError, totalTime);