Class TestCaseResultImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
com.atlassian.bamboo.resultsummary.tests.TestCaseResultImpl
- All Implemented Interfaces:
BambooIdProvider,BambooObject,TestCaseResult,NameProvider,Cloneable,Comparable<TestCaseResult>
@Entity
public class TestCaseResultImpl
extends HibernateBambooEntityObject
implements TestCaseResult
-
Constructor Summary
ConstructorsConstructorDescriptionTestCaseResultImpl(TestCase testCase, long duration, TestState state) TestCaseResultImpl(TestCase testCase, long duration, TestState state, @Nullable List<TestCaseResultError> testCaseResultErrors) TestCaseResultImpl(TestCase testCase, long duration, TestState state, @Nullable List<TestCaseResultError> testCaseResultErrors, List<String> quarantinedTests) Deprecated.since 5.7TestCaseResultImpl(TestCase testCase, long duration, TestState state, @Nullable List<TestCaseResultError> testCaseResultErrors, Set<String> quarantinedTests) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(TestCaseResult testCaseResult) booleanReturn the Delta state for this test, e.g.longHow long the test took to run@NotNull List<TestCaseResultError>intIf in delta state FAILING, return the build number for the build that this test started failing in.@Nullable String@Nullable StringgetName()getState()Get the state of this test run, e.g.inthashCode()booleanCheck if the test case result was quarantinedvoidsetDeltaState(TestDeltaState testDeltaState) Set the delta state for this test (the difference between the state of this test and the state in the last build)voidsetDuration(long duration) voidsetFailingSince(int buildNumber) Set the build number for the build that this test started failing in.voidsetQuarantined(boolean quarantined) voidvoidsetTestCase(TestCase testCase) voidsetTestClassResult(TestClassResult testClassResult) Set the TestClassResult this test result belongs toMethods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
getId, setIdMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
TestCaseResultImpl
public TestCaseResultImpl() -
TestCaseResultImpl
-
TestCaseResultImpl
public TestCaseResultImpl(TestCase testCase, long duration, TestState state, @Nullable @Nullable List<TestCaseResultError> testCaseResultErrors) -
TestCaseResultImpl
@Deprecated public TestCaseResultImpl(TestCase testCase, long duration, TestState state, @Nullable @Nullable List<TestCaseResultError> testCaseResultErrors, List<String> quarantinedTests) Deprecated.since 5.7 -
TestCaseResultImpl
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNameProvider- Specified by:
getNamein interfaceTestCaseResult- Returns:
- the name of the TestCase if available
-
getMethodName
- Specified by:
getMethodNamein interfaceTestCaseResult- Returns:
- the user friendly view of the TestCase if available.
-
getPrettyDuration
- Specified by:
getPrettyDurationin interfaceTestCaseResult- Returns:
- a user friendly view of the duration.
-
getTestCase
- Specified by:
getTestCasein interfaceTestCaseResult- Returns:
- The
TestCasethis result belongs to
-
setTestCase
-
getDuration
public long getDuration()Description copied from interface:TestCaseResultHow long the test took to run- Specified by:
getDurationin interfaceTestCaseResult- Returns:
- duration of the TestCase in milliseconds
-
setDuration
public void setDuration(long duration) -
getTestClassResult
- Specified by:
getTestClassResultin interfaceTestCaseResult- Returns:
- The testClassResult this result is part of
-
setTestClassResult
Description copied from interface:TestCaseResultSet the TestClassResult this test result belongs to- Specified by:
setTestClassResultin interfaceTestCaseResult- Parameters:
testClassResult- this test result belongs to
-
getErrors
- Specified by:
getErrorsin interfaceTestCaseResult- Returns:
- Any errors the test generated
-
getState
Description copied from interface:TestCaseResultGet the state of this test run, e.g. FAILED or SUCCESS- Specified by:
getStatein interfaceTestCaseResult- Returns:
- the state of this test run.
-
setState
-
getDeltaState
Description copied from interface:TestCaseResultReturn the Delta state for this test, e.g. fixed or broken- Specified by:
getDeltaStatein interfaceTestCaseResult- Returns:
- DeltaState
-
setDeltaState
Description copied from interface:TestCaseResultSet the delta state for this test (the difference between the state of this test and the state in the last build)- Specified by:
setDeltaStatein interfaceTestCaseResult- Parameters:
testDeltaState- - the delta state for this test
-
getFailingSince
public int getFailingSince()Description copied from interface:TestCaseResultIf 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.- Specified by:
getFailingSincein interfaceTestCaseResult- Returns:
- the build number for the build that this test started failing in.
-
setFailingSince
public void setFailingSince(int buildNumber) Description copied from interface:TestCaseResultSet the build number for the build that this test started failing in.- Specified by:
setFailingSincein interfaceTestCaseResult- Parameters:
buildNumber- that the test has been failing since
-
equals
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
compareTo
- Specified by:
compareToin interfaceComparable<TestCaseResult>
-
isQuarantined
public boolean isQuarantined()Description copied from interface:TestCaseResultCheck if the test case result was quarantined- Specified by:
isQuarantinedin interfaceTestCaseResult- Returns:
- true/false quarantine status for this result
-
setQuarantined
public void setQuarantined(boolean quarantined)
-