@Override protected String getTestSuiteName() { // in order for the gradle report to look good we put the test suite name as one of the // test class name. Map<TestIdentifier, TestResult> testResults = getRunResult().getTestResults(); if (testResults.isEmpty()) { return null; } Map.Entry<TestIdentifier, TestResult> testEntry = testResults.entrySet().iterator().next(); return testEntry.getKey().getClassName(); }
/** * Gets the set of completed tests. */ public Set<TestIdentifier> getCompletedTests() { Set<TestIdentifier> completedTests = new LinkedHashSet<TestIdentifier>(); for (Map.Entry<TestIdentifier, TestResult> testEntry : getTestResults().entrySet()) { if (!testEntry.getValue().getStatus().equals(TestStatus.INCOMPLETE)) { completedTests.add(testEntry.getKey()); } } return completedTests; }
@Override protected String getTestSuiteName() { // in order for the gradle report to look good we put the test suite name as one of the // test class name. Map<TestIdentifier, TestResult> testResults = getRunResult().getTestResults(); if (testResults.isEmpty()) { return null; } Map.Entry<TestIdentifier, TestResult> testEntry = testResults.entrySet().iterator().next(); return testEntry.getKey().getClassName(); }
Map<TestIdentifier, TestResult> testResults = mRunResult.getTestResults(); for (Map.Entry<TestIdentifier, TestResult> testEntry : testResults.entrySet()) { print(serializer, testEntry.getKey(), testEntry.getValue());