com.atlassian.bamboo.resultsummary.tests
Interface TestCaseResult

All Superinterfaces:
java.lang.Comparable<TestCaseResult>, NameProvider
All Known Implementing Classes:
TestCaseResultImpl

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

Represents a run of a TestCase. Belongs to a TestClassResult.


Method Summary
 TestDeltaState getDeltaState()
          Return the Delta state for this test, e.g.
 long getDuration()
          How long the test took to run
 java.util.List<TestCaseResultError> getErrors()
           
 int getFailingSince()
          If in delta state FAILING, return the build number for the build that this test started failing in.
 java.lang.String getMethodName()
           
 java.lang.String getName()
           
 java.lang.String getPrettyDuration()
           
 TestState getState()
          Get the state of this test run, e.g.
 TestCase getTestCase()
           
 TestClassResult getTestClassResult()
           
 void setDeltaState(TestDeltaState testDeltaState)
          Set the delta state for this test (the difference between the state of this test and the state in the last build)
 void setFailingSince(int buildNumber)
          Set the build number for the build that this test started failing in.
 void setTestClassResult(TestClassResult testClassResult)
          Set the TestClassResult this test result belongs to
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getTestCase

TestCase getTestCase()
Returns:
The TestCase this result belongs to

getName

java.lang.String getName()
Specified by:
getName in interface NameProvider
Returns:
the name of the TestCase if available

getMethodName

java.lang.String getMethodName()
Returns:
the user friendly view of the TestCase if available.

getPrettyDuration

java.lang.String getPrettyDuration()
Returns:
a user friendly view of the duration.

getDuration

long getDuration()
How long the test took to run

Returns:
duration of the TestCase in milliseconds

getTestClassResult

TestClassResult getTestClassResult()
Returns:
The testClassResult this result is part of

getErrors

@NotNull
java.util.List<TestCaseResultError> getErrors()
Returns:
Any errors the test generated

setTestClassResult

void setTestClassResult(TestClassResult testClassResult)
Set the TestClassResult this test result belongs to

Parameters:
testClassResult - this test result belongs to

getState

TestState getState()
Get the state of this test run, e.g. FAILED or SUCCESS

Returns:
the state of this test run.

getDeltaState

TestDeltaState getDeltaState()
Return the Delta state for this test, e.g. fixed or broken

Returns:
DeltaState

setDeltaState

void setDeltaState(TestDeltaState testDeltaState)
Set the delta state for this test (the difference between the state of this test and the state in the last build)

Parameters:
testDeltaState - - the delta state for this test

getFailingSince

int getFailingSince()
If in delta state FAILING, return the build number for the build that this test started failing in. If the delta state BROKEN, return the build numver this test was run in. If in delta state FIXED, return the build number at the beginning of the failure span that was fixed. Otherwise it will be -1.

Returns:
the build number for the build that this test started failing in.

setFailingSince

void setFailingSince(int buildNumber)
Set the build number for the build that this test started failing in.

Parameters:
buildNumber - that the test has been failing since


Copyright © 2010 Atlassian. All Rights Reserved.