public OutcomeCounter getTotalTests() { return count(TestType.ANY); }
public OutcomeCounter getTotalTests() { return count(TestType.ANY); }
public OutcomeCounter getTotalTests() { return count(TestType.ANY); }
private String testOutcomeSummary(TestOutcomes testOutcomes) { int errors = testOutcomes.count(TestType.ANY).withResult(TestResult.ERROR); int failures = testOutcomes.count(TestType.ANY).withResult(TestResult.FAILURE); String errorText = (errors > 0) ? "ERROR COUNT: " + errors : ""; String failureText = (failures > 0) ? "FAILURE COUNT: " + failures : ""; return "THUCYDIDES TEST FAILURES: " + errorText + " " + failureText; }
public Double withIndeterminateResult() { int passingStepCount = testOutcomes.count(testType).withResult(TestResult.SUCCESS); int failingStepCount = testOutcomes.count(testType).withResult(TestResult.FAILURE); int errorStepCount = testOutcomes.count(testType).withResult(TestResult.ERROR); int total = estimatedTotalTests; return (total == 0) ? 0.0 : ((total - passingStepCount - failingStepCount - errorStepCount) / (double) total); }
public Double withIndeterminateResult() { long passingStepCount = testOutcomes.count(testType).withResult(TestResult.SUCCESS); long failingStepCount = testOutcomes.count(testType).withResult(TestResult.FAILURE); long errorStepCount = testOutcomes.count(testType).withResult(TestResult.ERROR); long total = estimatedTotalTests; return (total == 0) ? 0.0 : ((total - passingStepCount - failingStepCount - errorStepCount) / (double) total); }
public Double withResult(TestResult expectedTestResult) { int testCount = testOutcomes.count(testType).withResult(expectedTestResult); return (estimatedTotalTests == 0) ? 0.0 : ((double) testCount) / ((double) estimatedTotalTests); }
public Double withIndeterminateResult() { int passingStepCount = testOutcomes.count(testType).withResult(TestResult.SUCCESS); int failingStepCount = testOutcomes.count(testType).withResult(TestResult.FAILURE); int errorStepCount = testOutcomes.count(testType).withResult(TestResult.ERROR); int total = estimatedTotalTests; return (total == 0) ? 0.0 : ((total - passingStepCount - failingStepCount - errorStepCount) / (double) total); }
private String testOutcomeSummary(TestOutcomes testOutcomes) { int errors = testOutcomes.count(TestType.ANY).withResult(TestResult.ERROR); int failures = testOutcomes.count(TestType.ANY).withResult(TestResult.FAILURE); String errorText = (errors > 0) ? "ERROR COUNT: " + errors : ""; String failureText = (failures > 0) ? "FAILURE COUNT: " + failures : ""; return "THUCYDIDES TEST FAILURES: " + errorText + " " + failureText; }
public Double withResult(TestResult expectedTestResult) { long testCount = testOutcomes.count(testType).withResult(expectedTestResult); return (estimatedTotalTests == 0) ? 0.0 : ((double) testCount) / ((double) estimatedTotalTests); }
public Double withResult(TestResult expectedTestResult) { int testCount = testOutcomes.count(testType).withResult(expectedTestResult); return (estimatedTotalTests == 0) ? 0.0 : ((double) testCount) / ((double) estimatedTotalTests); }
public OutcomeCounter count(String testType) { return count(TestType.valueOf(testType.toUpperCase())); }
public OutcomeCounter count(String testType) { return count(TestType.valueOf(testType.toUpperCase())); }
public OutcomeCounter count(String testType) { return count(TestType.valueOf(testType.toUpperCase())); }
private Element buildTestSuiteElement(Document doc, String testCaseName, TestOutcomes testCaseOutcomes) { int errors = testCaseOutcomes.count(TestType.ANY).withResult(TestResult.ERROR); int failures = testCaseOutcomes.count(TestType.ANY).withResult(TestResult.FAILURE); int success = testCaseOutcomes.count(TestType.ANY).withResult(TestResult.SUCCESS); int skipped = testCaseOutcomes.getTotal() - errors - failures - success; Element testSuiteElement = doc.createElement("testsuite"); testSuiteElement.setAttribute("name", testCaseName); testSuiteElement.setAttribute("time", Double.toString(testCaseOutcomes.getDurationInSeconds())); testSuiteElement.setAttribute("tests", Integer.toString(testCaseOutcomes.getTestCount())); testSuiteElement.setAttribute("errors", Integer.toString(errors)); testSuiteElement.setAttribute("skipped", Integer.toString(skipped)); testSuiteElement.setAttribute("failures", Integer.toString(failures)); testCaseOutcomes.getStartTime().ifPresent( startTime -> testSuiteElement.setAttribute("timestamp", TIMESTAMP_FORMAT.format(startTime)) ); return testSuiteElement; } }
private Element buildTestSuiteElement(Document doc, String testCaseName, TestOutcomes testCaseOutcomes) { int errors = testCaseOutcomes.count(TestType.ANY).withResult(TestResult.ERROR); int failures = testCaseOutcomes.count(TestType.ANY).withResult(TestResult.FAILURE); int success = testCaseOutcomes.count(TestType.ANY).withResult(TestResult.SUCCESS); int skipped = testCaseOutcomes.getTotal() - errors - failures - success; Element testSuiteElement = doc.createElement("testsuite"); testSuiteElement.setAttribute("name", testCaseName); testSuiteElement.setAttribute("time", Double.toString(testCaseOutcomes.getDurationInSeconds())); testSuiteElement.setAttribute("tests", Integer.toString(testCaseOutcomes.getTestCount())); testSuiteElement.setAttribute("errors", Integer.toString(errors)); testSuiteElement.setAttribute("skipped", Integer.toString(skipped)); testSuiteElement.setAttribute("failures", Integer.toString(failures)); if (testCaseOutcomes.getStartTime() != null) { testSuiteElement.setAttribute("timestamp", testCaseOutcomes.getStartTime().toString("YYYY-MM-DD hh:mm:ss")); } return testSuiteElement; } }
private String testOutcomeSummary(TestOutcomes testOutcomes) { int errors = testOutcomes.count(TestType.ANY).withResult(TestResult.ERROR); int failures = testOutcomes.count(TestType.ANY).withResult(TestResult.FAILURE); int compromised = testOutcomes.count(TestType.ANY).withResult(TestResult.COMPROMISED); return Joiner.on(" ").join("THUCYDIDES TEST FAILURES:", OutcomeSummary.forOutcome(TestResult.ERROR).withCount(errors), OutcomeSummary.forOutcome(TestResult.FAILURE).withCount(failures), OutcomeSummary.forOutcome(TestResult.COMPROMISED).withCount(compromised)); }