diff --git a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java index 381b1d5fcf6..5f1995d649f 100644 --- a/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java +++ b/firebase-firestore/src/test/java/com/google/firebase/firestore/spec/SpecTestCase.java @@ -1109,8 +1109,7 @@ public void testSpecTests() throws Exception { parsedSpecFiles.add(new Pair<>(f.getName(), fileJSON)); } - String testNameFilterFromSystemProperty = - emptyToNull(System.getProperty(TEST_FILTER_PROPERTY)); + String testNameFilterFromSystemProperty = emptyToNull(System.getProperty(TEST_FILTER_PROPERTY)); Pattern testNameFilter; if (testNameFilterFromSystemProperty == null) { testNameFilter = null; @@ -1119,6 +1118,9 @@ public void testSpecTests() throws Exception { testNameFilter = Pattern.compile(testNameFilterFromSystemProperty); } + int testPassCount = 0; + int testSkipCount = 0; + for (Pair parsedSpecFile : parsedSpecFiles) { String fileName = parsedSpecFile.first; JSONObject fileJSON = parsedSpecFile.second; @@ -1157,18 +1159,21 @@ public void testSpecTests() throws Exception { info("Spec test: " + name); runSteps(steps, config); ranAtLeastOneTest = true; + testPassCount++; } catch (AssertionError e) { - throw new AssertionError("Spec test failure: " + name, e); + throw new AssertionError("Spec test failure: " + name + " (" + fileName + ")", e); } long end = System.currentTimeMillis(); if (measureRuntime) { info("Runtime: " + (end - start) + " ms"); } } else { + testSkipCount++; info(" [SKIPPED] Spec test: " + name); } } } + info(getClass().getName() + " completed; pass=" + testPassCount + " skip=" + testSkipCount); assertTrue(ranAtLeastOneTest); }