From 9bad56729ad45d30d2c1cf452a7915c6f1eac5a7 Mon Sep 17 00:00:00 2001 From: Young Gyu Park Date: Tue, 14 Aug 2018 11:20:10 +0900 Subject: Updating servlet according to the change of entity Test: go/vts-web-staging Bug: 111481322 Change-Id: I8d10727045ce71f434b257deea5214c40795dc5b --- .../java/com/android/vts/servlet/ShowPlanRunServlet.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java') diff --git a/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java b/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java index bce89fc..9138a90 100644 --- a/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java +++ b/src/main/java/com/android/vts/servlet/ShowPlanRunServlet.java @@ -98,18 +98,24 @@ public class ShowPlanRunServlet extends BaseServlet { long startTime = 0; long endTime = 0; long moduleCount = 0; + long totalApiCount = 0L; + long totalCoveredApiCount = 0L; try { Entity testPlanRunEntity = datastore.get(planRunKey); TestPlanRunEntity testPlanRun = TestPlanRunEntity.fromEntity(testPlanRunEntity); - Map testRuns = datastore.get(testPlanRun.getTestRuns()); + Map testRuns = datastore.get(testPlanRun.getOldTestRuns()); testBuildId = testPlanRun.getTestBuildId(); passCount = (int) testPlanRun.getPassCount(); failCount = (int) testPlanRun.getFailCount(); + totalApiCount = testPlanRun.getTotalApiCount(); + logger.log(Level.INFO, "totalApiCount => " + totalApiCount); + totalCoveredApiCount = testPlanRun.getCoveredApiCount(); + logger.log(Level.INFO, "totalCoveredApiCount => " + totalCoveredApiCount); startTime = testPlanRun.getStartTimestamp(); endTime = testPlanRun.getEndTimestamp(); moduleCount = testPlanRun.getTestRuns().size(); - for (Key key : testPlanRun.getTestRuns()) { + for (Key key : testPlanRun.getOldTestRuns()) { if (!testRuns.containsKey(key)) continue; TestRunEntity testRunEntity = TestRunEntity.fromEntity(testRuns.get(key)); if (testRunEntity == null) continue; @@ -150,6 +156,8 @@ public class ShowPlanRunServlet extends BaseServlet { request.setAttribute("moduleCount", new Gson().toJson(moduleCount)); request.setAttribute("passingTestCaseCount", new Gson().toJson(passCount)); request.setAttribute("failingTestCaseCount", new Gson().toJson(failCount)); + request.setAttribute("totalApiCount", totalApiCount); + request.setAttribute("totalCoveredApiCount", totalCoveredApiCount); // data for pie chart request.setAttribute("topBuildResultCounts", new Gson().toJson(topBuildResultCounts)); -- cgit v1.2.3