com.atlassian.bamboo.resultsummary.tests
Interface TestClassResult

All Superinterfaces:
java.lang.Comparable<TestClassResult>, NameProvider
All Known Implementing Classes:
TestClassResultImpl

public interface TestClassResult
extends NameProvider, java.lang.Comparable<TestClassResult>

Represents a run of a test class. It groups and provides summary information for testCaseResults


Method Summary
 void addTestCase(TestCaseResult testCaseResult)
          Add a testCase to this TestClassResult (to this group)
 BuildResultsSummary getBuildResultsSummary()
           
 long getDuration()
          The total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)
 int getFailedTestCount()
           
 java.lang.String getName()
           
 java.lang.String getShortName()
           
 int getSuccessfulTestCount()
           
 java.util.List<TestCaseResult> getTestCaseResults()
          Retrieve the TestCaseResults contained within this TestClassResult
 TestClass getTestClass()
           
 void incrementFailedTestCount()
          add 1 to the current failed test count
 void incrementSuccessfulTestCount()
          add 1 to the current successful test count
 void setDuration(long duration)
          Set how long this testClassResult took.
 void setFailedTestCount(int failedTestCount)
          Set the number of failing tests in this group
 void setSuccessfulTestCount(int successfulTestCount)
          Set the number of successful tests in this group
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getTestClass

TestClass getTestClass()
Returns:
The associated TestClass this is a 'run' of.

getName

@Nullable
java.lang.String getName()
Specified by:
getName in interface NameProvider
Returns:
the name of TestClass

getShortName

@Nullable
java.lang.String getShortName()
Returns:
the short name of the TestClass (strips leading package names)

getTestCaseResults

@NotNull
java.util.List<TestCaseResult> getTestCaseResults()
Retrieve the TestCaseResults contained within this TestClassResult

Returns:
the TestCaseResults contained within this TestClassResult

addTestCase

void addTestCase(TestCaseResult testCaseResult)
Add a testCase to this TestClassResult (to this group)

Parameters:
testCaseResult - to add

getDuration

long getDuration()
The total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)

Returns:
total running time for this TestClass

setDuration

void setDuration(long duration)
Set how long this testClassResult took.

Parameters:
duration - - time in milliseconds

getFailedTestCount

int getFailedTestCount()
Returns:
Number of failed TestCaseResults in this TestClassResult

setFailedTestCount

void setFailedTestCount(int failedTestCount)
Set the number of failing tests in this group

Parameters:
failedTestCount - - number of failed tests in this group

getSuccessfulTestCount

int getSuccessfulTestCount()
Returns:
Number of successful TestCaseResults in this TestClassResult

setSuccessfulTestCount

void setSuccessfulTestCount(int successfulTestCount)
Set the number of successful tests in this group

Parameters:
successfulTestCount - - number of successful tests in this group

incrementSuccessfulTestCount

void incrementSuccessfulTestCount()
add 1 to the current successful test count


incrementFailedTestCount

void incrementFailedTestCount()
add 1 to the current failed test count


getBuildResultsSummary

BuildResultsSummary getBuildResultsSummary()
Returns:
the BuildResultsSummary this test class result is associated with.


Copyright © 2010 Atlassian. All Rights Reserved.