Class TestCaseImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.resultsummary.tests.TestCaseImpl
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,TestCase
,Cloneable
,Comparable<TestCase>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
@NotNull TestCase
Creates a copy of theTestCase
.boolean
long
long
int
int
int
Tests can be linked to a specific jira issue.Returns a sentence describing the test, derived from the method name of the test.getName()
int
int
int
@Nullable QuarantineStatistics
double
int
int
hashCode()
boolean
void
setAverageDuration
(long averageDuration) void
setFirstRanBuildNumber
(int firstRanBuildNumber) void
setLastRanBuildNumber
(int lastRanBuildNumber) void
setLastRecordedBuildNumber
(int lastRecordedBuildNumber) void
setLinkedJiraIssueKey
(@Nullable String issueKey) protected void
protected void
setNameAndTruncate
(String name) void
setNumberOfFailedRuns
(int numberOfFailedRuns) void
setNumberOfSkippedRuns
(int numberOfSkippedRuns) Set the number of runs this test has een skipped.void
setNumberOfSuccessRuns
(int numberOfSuccessRuns) void
setQuarantineStatistics
(@NotNull String quarantineUser, @NotNull Date quarantineDate) Deprecated.since 5.9void
setQuarantineStatistics
(@NotNull String quarantineUser, @NotNull Date quarantineDate, @Nullable Date quarantineExpiryDate) void
setQuarantineStatistics
(@Nullable QuarantineStatistics quarantineStatistics) void
setTestClass
(TestClass testClass) Set the testClass this test case belongs toMethods inherited from class com.atlassian.core.bean.EntityObject
clone, getCreationDate, getCurrentDate, getId, getLastModificationDate, setClock, setCreationDate, setId, 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
-
Field Details
-
MAX_LEN
public static final int MAX_LEN- See Also:
-
-
Constructor Details
-
TestCaseImpl
public TestCaseImpl() -
TestCaseImpl
-
TestCaseImpl
-
-
Method Details
-
getMethodName
Description copied from interface:TestCase
Returns a sentence describing the test, derived from the method name of the test.- Specified by:
getMethodName
in interfaceTestCase
- Returns:
- The sentence
-
getSuccessPercentage
public double getSuccessPercentage()- Specified by:
getSuccessPercentage
in interfaceTestCase
- Returns:
- how successful this test case has been. (success runs / total runs)
-
getTotalTestRuns
public int getTotalTestRuns()- Specified by:
getTotalTestRuns
in interfaceTestCase
- Returns:
- the total number of times this test has run.
-
getName
-
setNameAndTruncate
-
setName
-
getTestClass
- Specified by:
getTestClass
in interfaceTestCase
- Returns:
- the TestClass the testcase belongs to
-
setTestClass
Description copied from interface:TestCase
Set the testClass this test case belongs to- Specified by:
setTestClass
in interfaceTestCase
- Parameters:
testClass
- the test case belongs to
-
getNumberOfSuccessRuns
public int getNumberOfSuccessRuns()- Specified by:
getNumberOfSuccessRuns
in interfaceTestCase
- Returns:
- the number of times this test has run successfully
-
setNumberOfSuccessRuns
public void setNumberOfSuccessRuns(int numberOfSuccessRuns) - Specified by:
setNumberOfSuccessRuns
in interfaceTestCase
-
getNumberOfFailedRuns
public int getNumberOfFailedRuns()- Specified by:
getNumberOfFailedRuns
in interfaceTestCase
- Returns:
- the number of times this test has run and failed
-
setNumberOfFailedRuns
public void setNumberOfFailedRuns(int numberOfFailedRuns) - Specified by:
setNumberOfFailedRuns
in interfaceTestCase
-
getNumberOfSkippedRuns
public int getNumberOfSkippedRuns()- Specified by:
getNumberOfSkippedRuns
in interfaceTestCase
- Returns:
- the number of times this test has been skipped.
-
setNumberOfSkippedRuns
public void setNumberOfSkippedRuns(int numberOfSkippedRuns) Description copied from interface:TestCase
Set the number of runs this test has een skipped.- Specified by:
setNumberOfSkippedRuns
in interfaceTestCase
- Parameters:
numberOfSkippedRuns
- the new number of skipped runs.
-
getAverageDuration
public long getAverageDuration()- Specified by:
getAverageDuration
in interfaceTestCase
- Returns:
- the average duration in milliseconds of this test case for all test runs.
-
getAverageDurationInSeconds
public long getAverageDurationInSeconds()- Specified by:
getAverageDurationInSeconds
in interfaceTestCase
- Returns:
- the average duration in seconds of this test case for all test runs.
-
setAverageDuration
public void setAverageDuration(long averageDuration) - Specified by:
setAverageDuration
in interfaceTestCase
-
getFirstRanBuildNumber
public int getFirstRanBuildNumber()- Specified by:
getFirstRanBuildNumber
in interfaceTestCase
- Returns:
- the build number that this test was first run in.
-
setFirstRanBuildNumber
public void setFirstRanBuildNumber(int firstRanBuildNumber) - Specified by:
setFirstRanBuildNumber
in interfaceTestCase
-
getLastRanBuildNumber
public int getLastRanBuildNumber()- Specified by:
getLastRanBuildNumber
in interfaceTestCase
- Returns:
- the most recent build (except for once-off builds) that this test was part of
-
setLastRanBuildNumber
public void setLastRanBuildNumber(int lastRanBuildNumber) - Specified by:
setLastRanBuildNumber
in interfaceTestCase
-
getLastRecordedBuildNumber
public int getLastRecordedBuildNumber()- Specified by:
getLastRecordedBuildNumber
in interfaceTestCase
- Returns:
- the most recent build (including once-off builds) that this test was part of
-
setLastRecordedBuildNumber
public void setLastRecordedBuildNumber(int lastRecordedBuildNumber) - Specified by:
setLastRecordedBuildNumber
in interfaceTestCase
-
isQuarantined
public boolean isQuarantined()- Specified by:
isQuarantined
in interfaceTestCase
-
setQuarantineStatistics
@Deprecated public void setQuarantineStatistics(@NotNull @NotNull String quarantineUser, @NotNull @NotNull Date quarantineDate) Deprecated.since 5.9- Specified by:
setQuarantineStatistics
in interfaceTestCase
-
setQuarantineStatistics
public void setQuarantineStatistics(@NotNull @NotNull String quarantineUser, @NotNull @NotNull Date quarantineDate, @Nullable @Nullable Date quarantineExpiryDate) - Specified by:
setQuarantineStatistics
in interfaceTestCase
-
setQuarantineStatistics
- Specified by:
setQuarantineStatistics
in interfaceTestCase
-
getQuarantineStatistics
- Specified by:
getQuarantineStatistics
in interfaceTestCase
-
getLinkedJiraIssueKey
Description copied from interface:TestCase
Tests can be linked to a specific jira issue. This is the issue key of that issue.- Specified by:
getLinkedJiraIssueKey
in interfaceTestCase
- Returns:
-
setLinkedJiraIssueKey
- Specified by:
setLinkedJiraIssueKey
in interfaceTestCase
-
copyTestCase
Description copied from interface:TestCase
- Specified by:
copyTestCase
in interfaceTestCase
- Returns:
- copyOfTestCase
-
equals
- Overrides:
equals
in classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.atlassian.core.bean.EntityObject
-
compareTo
- Specified by:
compareTo
in interfaceComparable<TestCase>
-