Commit 2635f7b7 authored by 黎博's avatar 黎博

场景报告接口新增总执行时间

parent be8d3b4e
...@@ -123,6 +123,7 @@ public class TestReportController { ...@@ -123,6 +123,7 @@ public class TestReportController {
int total = sceneTestcaseReports.size(); int total = sceneTestcaseReports.size();
int pass = 0; int pass = 0;
int fail = 0; int fail = 0;
Long totalElapsedTime = 0L;
for (SceneTestcaseReport sceneTestcaseReport: sceneTestcaseReports) { for (SceneTestcaseReport sceneTestcaseReport: sceneTestcaseReports) {
String status = sceneTestcaseReport.getStatus(); String status = sceneTestcaseReport.getStatus();
if (status.equals("pass")) { if (status.equals("pass")) {
...@@ -130,10 +131,12 @@ public class TestReportController { ...@@ -130,10 +131,12 @@ public class TestReportController {
} else if (status.equals("fail")) { } else if (status.equals("fail")) {
fail += 1; fail += 1;
} }
totalElapsedTime += sceneTestcaseReport.getElapsedTime();
} }
map.put("total", total); map.put("total", total);
map.put("pass", pass); map.put("pass", pass);
map.put("fail", fail); map.put("fail", fail);
map.put("totalElapsedTime", totalElapsedTime);
map.put("list", sceneTestcaseReports); map.put("list", sceneTestcaseReports);
return JsonResult.buildSuccessResult(map); return JsonResult.buildSuccessResult(map);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment