org.schmant.task.junit4.suitereporter
Class TestRun

java.lang.Object
  extended by org.schmant.task.junit4.suitereporter.TestRun

public class TestRun
extends Object

The TestRun contains data from a test run. It is used by JUnit4TestSuiteReportPrinter:s.

The data stored in a FailedTest object is taken from a JUnit org.junit.runner.Description and org.junit.runner.Result object.

Instances of this class are immutable.

Since:
0.6
Author:
Karl Gustafsson
Task_package:
org.junit.junit4

Constructor Summary
TestRun(String testSuiteClass, String displayName, int testCount, int failureCount, int ignoreCount, int runCount, long runTime, List<FailedTest> failures)
           
 
Method Summary
 String getDisplayName()
          Get the test run's display name.
 int getFailureCount()
          Get the number of failed tests in this test run.
 List<FailedTest> getFailures()
          Get a list of FailedTest objects representing the failures in this test run.
 int getIgnoreCount()
          Get the number of ignored tests in this test run.
 int getRunCount()
          Get the number of run tests in this test run.
 long getRunTime()
          Get the total time it took to run the test run.
 int getTestCount()
          Get the total number of tests in this test run.
 String getTestSuiteClasses()
          Get the fully qualified names of the test suite classes run in this test run, separated by commas.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestRun

public TestRun(String testSuiteClass,
               String displayName,
               int testCount,
               int failureCount,
               int ignoreCount,
               int runCount,
               long runTime,
               List<FailedTest> failures)
Method Detail

getTestSuiteClasses

public String getTestSuiteClasses()
Get the fully qualified names of the test suite classes run in this test run, separated by commas.

Returns:
The fully qualified names of the test classes run in this test run.

getDisplayName

public String getDisplayName()
Get the test run's display name.

Returns:
The display name.

getFailureCount

public int getFailureCount()
Get the number of failed tests in this test run.

Returns:
The number of failed tests in this test run.

getFailures

public List<FailedTest> getFailures()
Get a list of FailedTest objects representing the failures in this test run.

Returns:
A list of FailedTest objects.

getIgnoreCount

public int getIgnoreCount()
Get the number of ignored tests in this test run.

Returns:
The number of ignored tests in this test run.

getRunCount

public int getRunCount()
Get the number of run tests in this test run.

Returns:
The number of run tests in this test run.

getRunTime

public long getRunTime()
Get the total time it took to run the test run.

Returns:
The total run time, in milliseconds.

getTestCount

public int getTestCount()
Get the total number of tests in this test run.

Returns:
The number of tests in this test run.

toString

public String toString()
Overrides:
toString in class Object