/** * Find the pending or ignored test outcomes in this set * * @return A new set of test outcomes containing only the pending or ignored tests */ @SuppressWarnings("unchecked") public TestOutcomes getPendingTests() { List<TestOutcome> pendingOrSkippedOutcomes = outcomesWithResults(outcomes, PENDING, SKIPPED); return TestOutcomes.of(pendingOrSkippedOutcomes) .withLabel(labelForTestsWithStatus("pending tests")) .withRootOutcomes(getRootOutcomes()); }
/** * Find the successful test outcomes in this set * * @return A new set of test outcomes containing only the successful tests */ public TestOutcomes getPassingTests() { return TestOutcomes.of(filter(withResult(TestResult.SUCCESS), outcomes)) .withLabel(labelForTestsWithStatus("passing tests")) .withRootOutcomes(getRootOutcomes()); }
/** * Find the failing test outcomes in this set * * @return A new set of test outcomes containing only the failing tests */ public TestOutcomes getFailingTests() { return TestOutcomes.of(filter(withResult(TestResult.FAILURE), outcomes)) .withLabel(labelForTestsWithStatus("failing tests")) .withRootOutcomes(getRootOutcomes()); }
/** * Return a copy of the current test outcomes, with test run history and statistics. * * @return a TestOutcome instance containing a list of TestOutcomeWithHistory instances. */ public TestOutcomes withHistory() { return TestOutcomes.of(convert(outcomes, toOutcomesWithHistory())); }
public TestOutcomes withTag(TestTag tag) { return TestOutcomes.of(filter(havingTag(tag), outcomes)) .withLabel(tag.getName()) .withRootOutcomes(getRootOutcomes()); }
/** * Find the test outcomes with a given tag name * * @param tagName the name of the tag type we are filtering on * @return A new set of test outcomes for this tag name */ public TestOutcomes withTag(String tagName) { return TestOutcomes.of(filter(havingTagName(tagName), outcomes)) .withLabel(tagName) .withRootOutcomes(getRootOutcomes()); }
/** * Find the test outcomes with a given tag type * * @param tagType the tag type we are filtering on * @return A new set of test outcomes for this tag type */ public TestOutcomes withTagType(String tagType) { return TestOutcomes.of(filter(havingTagType(tagType), outcomes)) .withLabel(tagType) .withRootOutcomes(this.getRootOutcomes()); }