Interface TestCaseResult
- All Superinterfaces:
BambooIdProvider
,BambooObject
,Comparable<TestCaseResult>
,NameProvider
- All Known Implementing Classes:
TestCaseResultImpl
Represents a run of a TestCase.
Belongs to a TestClassResult.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the Delta state for this test, e.g.long
How long the test took to run@NotNull List<TestCaseResultError>
int
If in delta state FAILING, return the build number for the build that this test started failing in.getName()
getState()
Get the state of this test run, e.g.boolean
Check if the test case result was quarantinedvoid
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 toMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getTestCase
TestCase getTestCase()- Returns:
- The
TestCase
this result belongs to
-
getName
String getName()- Specified by:
getName
in interfaceNameProvider
- Returns:
- the name of the TestCase if available
-
getMethodName
String getMethodName()- Returns:
- the user friendly view of the TestCase if available.
-
getPrettyDuration
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
- Returns:
- Any errors the test generated
-
setTestClassResult
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
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
-
isQuarantined
boolean isQuarantined()Check if the test case result was quarantined- Returns:
- true/false quarantine status for this result
-