public int withAnyResult() { return testOutcomes.getTotal(); } }
public int withAnyResult() { return outcomes.getTotal(); } }
public int withAnyResult() { return testOutcomes.getTotal(); } }
private void logOutcomesFrom(TestOutcomes testOutcomes) { logger.info("----------------------"); logger.info("SERENITY TEST OUTCOMES"); logger.info("----------------------"); logger.info(" - Tests executed: " + testOutcomes.getTotal()); logger.info(" - Tests passed: " + testOutcomes.getPassingTests().getTotal()); logger.info(" - Tests failed: " + testOutcomes.getFailingTests().getTotal()); logger.info(" - Tests with errors: " + testOutcomes.getErrorTests().getTotal()); logger.info(" - Tests pending: " + testOutcomes.getPendingTests().getTotal()); logger.info(" - Tests compromised: " + testOutcomes.getCompromisedTests().getTotal()); }
public int getTotalMatchingScenarios() { if (resultFilter == null) { return getTotal(); } return scenarioCountWithResult(resultFilter); }
private long countRequirementsWithoutTestsIn(Requirement rootRequirement) { return getFlattenedRequirements(rootRequirement).stream() .filter( requirement -> testOutcomes.forRequirement(requirement).getTotal() == 0) .count(); }
public Double withIndeterminateResult() { int pendingCount = countTestsWithResult(TestResult.PENDING, testType); int ignoredCount = countTestsWithResult(TestResult.IGNORED, testType); int skippedCount = countTestsWithResult(TestResult.SKIPPED, testType); return (getTotal() == 0) ? 0 : ((pendingCount + skippedCount + ignoredCount) / (double) getTotal()); } public Double withFailureOrError() {
public Double withIndeterminateResult() { int pendingCount = countTestsWithResult(TestResult.PENDING, testType); int ignoredCount = countTestsWithResult(TestResult.IGNORED, testType); int skippedCount = countTestsWithResult(TestResult.SKIPPED, testType); return (getTotal() == 0) ? 0 : ((pendingCount + skippedCount + ignoredCount) / (double) getTotal()); } public Double withFailureOrError() {
public Double withIndeterminateResult() { int pendingCount = countTestsWithResult(TestResult.PENDING, testType); int ignoredCount = countTestsWithResult(TestResult.IGNORED, testType); int skippedCount = countTestsWithResult(TestResult.SKIPPED, testType); return (getTotal() == 0) ? 0 : ((pendingCount + skippedCount + ignoredCount) / (double) getTotal()); } public Double withFailureOrError() {
public ResultCounts(TestOutcomes testOutcomes) { this.testOutcomes = testOutcomes; for(TestResult result : TestResult.values()) { automatedTests.put(result, testOutcomes.ofType(TestType.AUTOMATED).scenarioCountWithResult(result)); manualTests.put(result, testOutcomes.ofType(TestType.MANUAL).scenarioCountWithResult(result)); totalTests.put(result, automatedTests.get(result) + manualTests.get(result)); } this.totalAutomatedTests = testOutcomes.ofType(TestType.AUTOMATED).getTotal(); this.totalManualTests = testOutcomes.ofType(TestType.MANUAL).getTotal(); this.totalTestCount = testOutcomes.getTotal(); }
public int withIndeterminateResult() { return testOutcomes.getTotal() - withResult(TestResult.SUCCESS) - withResult(TestResult.FAILURE) - withResult(TestResult.ERROR); }
public int withIndeterminateResult() { return testOutcomes.getTotal() - withResult(TestResult.SUCCESS) - withResult(TestResult.FAILURE) - withResult(TestResult.ERROR); }
public int withIndeterminateResult() { return testOutcomes.getTotal() - withResult(TestResult.SUCCESS) - withResult(TestResult.FAILURE) - withResult(TestResult.ERROR); }
private int countRequirementsWithoutTestsIn(Requirement rootRequirement) { List<Requirement> flattenedRequirements = getFlattenedRequirements(rootRequirement); int requirementsWithoutTests = 0; for(Requirement requirement : flattenedRequirements) { TestOutcomes matchingOutcomes = testOutcomes.withTag(requirement.asTag()); if (matchingOutcomes.getTotal() == 0) { requirementsWithoutTests++; } } return requirementsWithoutTests; }
public int withIndeterminateResult() { return outcomes.getTotal() - withResult(TestResult.SUCCESS) - withResult(TestResult.FAILURE) - withResult(TestResult.ERROR); }
private int countRequirementsWithoutTestsIn(Requirement rootRequirement) { List<Requirement> flattenedRequirements = getFlattenedRequirements(rootRequirement); int requirementsWithoutTests = 0; for(Requirement requirement : flattenedRequirements) { TestOutcomes matchingOutcomes = testOutcomes.withTag(requirement.asTag()); if (matchingOutcomes.getTotal() == 0) { requirementsWithoutTests++; } } return requirementsWithoutTests; }
public int withIndeterminateResult() { return outcomes.getTotal() - withResult(TestResult.SUCCESS) - withResult(TestResult.FAILURE) - withResult(TestResult.ERROR); }
private Optional<TestOutcomes> loadOutcomes() { TestOutcomes outcomes = null; try { outcomes = TestOutcomeLoader.loadTestOutcomes().inFormat(OutcomeFormat.JSON).from(outputDirectory); if (outcomes.getTotal() == 0) { outcomes = TestOutcomeLoader.loadTestOutcomes().inFormat(OutcomeFormat.XML).from(outputDirectory); } } catch (IOException e) { e.printStackTrace(); } return Optional.of(outcomes); } }
public int withIndeterminateResult() { return outcomes.getTotal() - withResult(TestResult.SUCCESS) - withResult(TestResult.FAILURE) - withResult(TestResult.ERROR) - withResult(TestResult.COMPROMISED); }