Class TestClassResultImpl
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.core.BambooEntityObject
-
- com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
-
- com.atlassian.bamboo.resultsummary.tests.TestClassResultImpl
-
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,TestClassResult
,TestClassResultDescriptor
,NameProvider
,Cloneable
,Comparable<TestClassResult>
@Entity public class TestClassResultImpl extends HibernateBambooEntityObject implements TestClassResult
-
-
Constructor Summary
Constructors Constructor Description TestClassResultImpl()
TestClassResultImpl(TestClass testClass, BuildResultsSummary summary)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTestCase(TestCaseResult testCaseResult)
Add a testCase to this TestClassResult (to this group)int
compareTo(TestClassResult testClassResult)
boolean
equals(Object o)
BuildResultsSummary
getBuildResultsSummary()
long
getDuration()
The total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)int
getFailedTestCount()
@Nullable String
getName()
@Nullable String
getShortName()
int
getSkippedTestCount()
int
getSuccessfulTestCount()
@NotNull List<TestCaseResult>
getTestCaseResults()
Retrieve the TestCaseResults contained within this TestClassResult@NotNull Set<TestCaseResult>
getTestCaseResultsSet()
Retrieve the TestCaseResults contained within this TestClassResultTestClass
getTestClass()
int
hashCode()
void
incrementFailedTestCount()
add 1 to the current failed test countvoid
incrementSkippedTestCount()
add 1 to the current skipped test count.void
incrementSuccessfulTestCount()
add 1 to the current successful test countvoid
setBuildResultsSummary(BuildResultsSummary buildResultsSummary)
void
setDuration(long duration)
Set how long this testClassResult took.void
setFailedTestCount(int failedTestCount)
Set the number of failing tests in this groupvoid
setSkippedTestCount(int skippedTestCount)
Set the number of skipped tests in this groupvoid
setSuccessfulTestCount(int successfulTestCount)
Set the number of successful tests in this groupprotected void
setTestClass(TestClass testClass)
-
Methods inherited from class com.atlassian.bamboo.hibernate.HibernateBambooEntityObject
getId, setId
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getLastModificationDate, setClock, setCreationDate, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Constructor Detail
-
TestClassResultImpl
public TestClassResultImpl()
-
TestClassResultImpl
public TestClassResultImpl(TestClass testClass, BuildResultsSummary summary)
-
-
Method Detail
-
getName
@Nullable public @Nullable String getName()
- Specified by:
getName
in interfaceNameProvider
- Specified by:
getName
in interfaceTestClassResultDescriptor
- Returns:
- the name of TestClass
-
getShortName
@Nullable public @Nullable String getShortName()
- Specified by:
getShortName
in interfaceTestClassResultDescriptor
- Returns:
- the short name of the TestClass (strips leading package names)
-
incrementSuccessfulTestCount
public void incrementSuccessfulTestCount()
Description copied from interface:TestClassResult
add 1 to the current successful test count- Specified by:
incrementSuccessfulTestCount
in interfaceTestClassResult
-
incrementFailedTestCount
public void incrementFailedTestCount()
Description copied from interface:TestClassResult
add 1 to the current failed test count- Specified by:
incrementFailedTestCount
in interfaceTestClassResult
-
getTestClass
public TestClass getTestClass()
- Specified by:
getTestClass
in interfaceTestClassResult
- Returns:
- The associated TestClass this is a 'run' of.
-
setTestClass
protected void setTestClass(TestClass testClass)
-
getDuration
public long getDuration()
Description copied from interface:TestClassResult
The total running time (in milliseconds) for this class (cumulation of all TestCaseResults durations)- Specified by:
getDuration
in interfaceTestClassResult
- Returns:
- total running time for this TestClass
-
setDuration
public void setDuration(long duration)
Description copied from interface:TestClassResult
Set how long this testClassResult took.- Specified by:
setDuration
in interfaceTestClassResult
- Parameters:
duration
- - time in milliseconds
-
getTestCaseResults
@NotNull public @NotNull List<TestCaseResult> getTestCaseResults()
Description copied from interface:TestClassResult
Retrieve the TestCaseResults contained within this TestClassResult- Specified by:
getTestCaseResults
in interfaceTestClassResult
- Returns:
- the TestCaseResults contained within this TestClassResult
-
getTestCaseResultsSet
@NotNull public @NotNull Set<TestCaseResult> getTestCaseResultsSet()
Description copied from interface:TestClassResult
Retrieve the TestCaseResults contained within this TestClassResult- Specified by:
getTestCaseResultsSet
in interfaceTestClassResult
- Returns:
- the TestCaseResults contained within this TestClassResult
-
addTestCase
public void addTestCase(TestCaseResult testCaseResult)
Description copied from interface:TestClassResult
Add a testCase to this TestClassResult (to this group)- Specified by:
addTestCase
in interfaceTestClassResult
- Parameters:
testCaseResult
- to add
-
getFailedTestCount
public int getFailedTestCount()
- Specified by:
getFailedTestCount
in interfaceTestClassResult
- Returns:
- Number of failed TestCaseResults in this TestClassResult
-
setFailedTestCount
public void setFailedTestCount(int failedTestCount)
Description copied from interface:TestClassResult
Set the number of failing tests in this group- Specified by:
setFailedTestCount
in interfaceTestClassResult
- Parameters:
failedTestCount
- - number of failed tests in this group
-
getSuccessfulTestCount
public int getSuccessfulTestCount()
- Specified by:
getSuccessfulTestCount
in interfaceTestClassResult
- Returns:
- Number of successful TestCaseResults in this TestClassResult
-
setSuccessfulTestCount
public void setSuccessfulTestCount(int successfulTestCount)
Description copied from interface:TestClassResult
Set the number of successful tests in this group- Specified by:
setSuccessfulTestCount
in interfaceTestClassResult
- Parameters:
successfulTestCount
- - number of successful tests in this group
-
incrementSkippedTestCount
public void incrementSkippedTestCount()
Description copied from interface:TestClassResult
add 1 to the current skipped test count.- Specified by:
incrementSkippedTestCount
in interfaceTestClassResult
-
getSkippedTestCount
public int getSkippedTestCount()
- Specified by:
getSkippedTestCount
in interfaceTestClassResult
- Returns:
- Number of skipped TestCaseResults in this TestClassResult.
-
setSkippedTestCount
public void setSkippedTestCount(int skippedTestCount)
Description copied from interface:TestClassResult
Set the number of skipped tests in this group- Specified by:
setSkippedTestCount
in interfaceTestClassResult
- Parameters:
skippedTestCount
- - number of skipped tests in this group
-
getBuildResultsSummary
public BuildResultsSummary getBuildResultsSummary()
- Specified by:
getBuildResultsSummary
in interfaceTestClassResult
- Returns:
- the BuildResultsSummary this test class result is associated with.
-
setBuildResultsSummary
public void setBuildResultsSummary(BuildResultsSummary buildResultsSummary)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
compareTo
public int compareTo(TestClassResult testClassResult)
- Specified by:
compareTo
in interfaceComparable<TestClassResult>
-
-