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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint@NotNull TestCaseCreates a copy of theTestCase.booleanlonglongintintintTests can be linked to a specific jira issue.Returns a sentence describing the test, derived from the method name of the test.getName()intintint@Nullable QuarantineStatisticsdoubleintinthashCode()booleanvoidsetAverageDuration(long averageDuration) voidsetFirstRanBuildNumber(int firstRanBuildNumber) voidsetLastRanBuildNumber(int lastRanBuildNumber) voidsetLastRecordedBuildNumber(int lastRecordedBuildNumber) voidsetLinkedJiraIssueKey(@Nullable String issueKey) protected voidprotected voidsetNameAndTruncate(String name) voidsetNumberOfFailedRuns(int numberOfFailedRuns) voidsetNumberOfSkippedRuns(int numberOfSkippedRuns) Set the number of runs this test has een skipped.voidsetNumberOfSuccessRuns(int numberOfSuccessRuns) voidsetQuarantineStatistics(@NotNull String quarantineUser, @NotNull Date quarantineDate) Deprecated.since 5.9voidsetQuarantineStatistics(@NotNull String quarantineUser, @NotNull Date quarantineDate, @Nullable Date quarantineExpiryDate) voidsetQuarantineStatistics(@Nullable QuarantineStatistics quarantineStatistics) voidsetTestClass(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, 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
-
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:TestCaseReturns a sentence describing the test, derived from the method name of the test.- Specified by:
getMethodNamein interfaceTestCase- Returns:
- The sentence
-
getSuccessPercentage
public double getSuccessPercentage()- Specified by:
getSuccessPercentagein interfaceTestCase- Returns:
- how successful this test case has been. (success runs / total runs)
-
getTotalTestRuns
public int getTotalTestRuns()- Specified by:
getTotalTestRunsin interfaceTestCase- Returns:
- the total number of times this test has run.
-
getName
-
setNameAndTruncate
-
setName
-
getTestClass
- Specified by:
getTestClassin interfaceTestCase- Returns:
- the TestClass the testcase belongs to
-
setTestClass
Description copied from interface:TestCaseSet the testClass this test case belongs to- Specified by:
setTestClassin interfaceTestCase- Parameters:
testClass- the test case belongs to
-
getNumberOfSuccessRuns
public int getNumberOfSuccessRuns()- Specified by:
getNumberOfSuccessRunsin interfaceTestCase- Returns:
- the number of times this test has run successfully
-
setNumberOfSuccessRuns
public void setNumberOfSuccessRuns(int numberOfSuccessRuns) - Specified by:
setNumberOfSuccessRunsin interfaceTestCase
-
getNumberOfFailedRuns
public int getNumberOfFailedRuns()- Specified by:
getNumberOfFailedRunsin interfaceTestCase- Returns:
- the number of times this test has run and failed
-
setNumberOfFailedRuns
public void setNumberOfFailedRuns(int numberOfFailedRuns) - Specified by:
setNumberOfFailedRunsin interfaceTestCase
-
getNumberOfSkippedRuns
public int getNumberOfSkippedRuns()- Specified by:
getNumberOfSkippedRunsin interfaceTestCase- Returns:
- the number of times this test has been skipped.
-
setNumberOfSkippedRuns
public void setNumberOfSkippedRuns(int numberOfSkippedRuns) Description copied from interface:TestCaseSet the number of runs this test has een skipped.- Specified by:
setNumberOfSkippedRunsin interfaceTestCase- Parameters:
numberOfSkippedRuns- the new number of skipped runs.
-
getAverageDuration
public long getAverageDuration()- Specified by:
getAverageDurationin interfaceTestCase- Returns:
- the average duration in milliseconds of this test case for all test runs.
-
getAverageDurationInSeconds
public long getAverageDurationInSeconds()- Specified by:
getAverageDurationInSecondsin interfaceTestCase- Returns:
- the average duration in seconds of this test case for all test runs.
-
setAverageDuration
public void setAverageDuration(long averageDuration) - Specified by:
setAverageDurationin interfaceTestCase
-
getFirstRanBuildNumber
public int getFirstRanBuildNumber()- Specified by:
getFirstRanBuildNumberin interfaceTestCase- Returns:
- the build number that this test was first run in.
-
setFirstRanBuildNumber
public void setFirstRanBuildNumber(int firstRanBuildNumber) - Specified by:
setFirstRanBuildNumberin interfaceTestCase
-
getLastRanBuildNumber
public int getLastRanBuildNumber()- Specified by:
getLastRanBuildNumberin 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:
setLastRanBuildNumberin interfaceTestCase
-
getLastRecordedBuildNumber
public int getLastRecordedBuildNumber()- Specified by:
getLastRecordedBuildNumberin interfaceTestCase- Returns:
- the most recent build (including once-off builds) that this test was part of
-
setLastRecordedBuildNumber
public void setLastRecordedBuildNumber(int lastRecordedBuildNumber) - Specified by:
setLastRecordedBuildNumberin interfaceTestCase
-
isQuarantined
public boolean isQuarantined()- Specified by:
isQuarantinedin interfaceTestCase
-
setQuarantineStatistics
@Deprecated public void setQuarantineStatistics(@NotNull @NotNull String quarantineUser, @NotNull @NotNull Date quarantineDate) Deprecated.since 5.9- Specified by:
setQuarantineStatisticsin interfaceTestCase
-
setQuarantineStatistics
public void setQuarantineStatistics(@NotNull @NotNull String quarantineUser, @NotNull @NotNull Date quarantineDate, @Nullable @Nullable Date quarantineExpiryDate) - Specified by:
setQuarantineStatisticsin interfaceTestCase
-
setQuarantineStatistics
- Specified by:
setQuarantineStatisticsin interfaceTestCase
-
getQuarantineStatistics
- Specified by:
getQuarantineStatisticsin interfaceTestCase
-
getLinkedJiraIssueKey
Description copied from interface:TestCaseTests can be linked to a specific jira issue. This is the issue key of that issue.- Specified by:
getLinkedJiraIssueKeyin interfaceTestCase- Returns:
-
setLinkedJiraIssueKey
- Specified by:
setLinkedJiraIssueKeyin interfaceTestCase
-
copyTestCase
Description copied from interface:TestCase- Specified by:
copyTestCasein interfaceTestCase- Returns:
- copyOfTestCase
-
equals
- Overrides:
equalsin classcom.atlassian.core.bean.EntityObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.atlassian.core.bean.EntityObject
-
compareTo
- Specified by:
compareToin interfaceComparable<TestCase>
-