net.thucydides.core.statistics.model
Class TestStatistics
java.lang.Object
net.thucydides.core.statistics.model.TestStatistics
public class TestStatistics
- extends Object
A summary of statistics related to a particular set of tests.
First, obtain a set of statistics using the HibernateTestStatisticsProvider class. For example, you could
obtain statistics for a particular test outcome like this:
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();
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestStatistics
public TestStatistics(Long totalTestRuns,
Long passingTestRuns,
Long failingTestRuns,
List<TestResult> testResults,
List<TestRunTag> tags)
getTotalTestRuns
public Long getTotalTestRuns()
getPassingTestRuns
public Long getPassingTestRuns()
getFailingTestRuns
public Long getFailingTestRuns()
getOverallPassRate
public Double getOverallPassRate()
getTags
public List<TestRunTag> getTags()
getPassRate
public TestStatistics.PassRateBuilder getPassRate()
- Calculate the pass rate over a given number of tests, e.g.
Double recentPassRate = stats.getPassRate().overTheLast(5).testRuns();
countResults
public TestStatistics.ResultCountBuilder countResults()
Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.