public class TestStatistics extends Object
TestStatistics stats = testStatisticsProvider.statisticsForTests(With.title(testOutcome.getTitle()));
or
TestStatistics stats = testStatisticsProvider.statisticsForTests(With.tag("A story));
Then, you can obtain various statistics about the test (or group of tests):
Double passRateForAllTests = stats.getOverallPassRate();
Double recentPassRate = stats.getPassRate().overTheLast(5).testRuns();
Modifier and Type | Class and Description |
---|---|
class |
TestStatistics.PassRateBuilder |
class |
TestStatistics.ResultCountBuilder |
Constructor and Description |
---|
TestStatistics(Long totalTestRuns,
Long passingTestRuns,
Long failingTestRuns,
List<TestResult> testResults,
List<TestRunTag> tags) |
Modifier and Type | Method and Description |
---|---|
TestStatistics.ResultCountBuilder |
countResults() |
Long |
getFailingTestRuns() |
Double |
getOverallPassRate() |
Long |
getPassingTestRuns() |
TestStatistics.PassRateBuilder |
getPassRate()
Calculate the pass rate over a given number of tests, e.g.
|
List<TestRunTag> |
getTags() |
Long |
getTotalTestRuns() |
public TestStatistics(Long totalTestRuns, Long passingTestRuns, Long failingTestRuns, List<TestResult> testResults, List<TestRunTag> tags)
public Long getTotalTestRuns()
public Long getPassingTestRuns()
public Long getFailingTestRuns()
public Double getOverallPassRate()
public List<TestRunTag> getTags()
public TestStatistics.PassRateBuilder getPassRate()
Double recentPassRate = stats.getPassRate().overTheLast(5).testRuns();
public TestStatistics.ResultCountBuilder countResults()
Copyright © 2011–2014 Wakaleo Consulting. All rights reserved.