Interface TestCase
- All Superinterfaces:
BambooIdProvider
,BambooObject
,Comparable<TestCase>
- All Known Implementing Classes:
TestCaseImpl
Represents a test in a plan. A TestCase belongs to a
TestClass
. And when this test is run it will produce a TestCaseResult
-
Method Summary
Modifier and TypeMethodDescription@NotNull TestCase
Creates a copy of theTestCase
.long
long
int
int
int
@Nullable String
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
boolean
void
setAverageDuration
(long averageDuration) void
setFirstRanBuildNumber
(int firstRanBuildNumber) void
setLastRanBuildNumber
(int lastRanBuildNumber) void
setLastRecordedBuildNumber
(int lastRecordedBuildNumber) void
setLinkedJiraIssueKey
(@Nullable String issueKey) 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, @Nullable Date quarantineExpiryDate) void
setQuarantineStatistics
(@Nullable QuarantineStatistics quarantineStatistics) void
setTestClass
(TestClass testClass) Set the testClass this test case 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
-
getName
String getName()- Returns:
- The true name of the test case
-
getTestClass
TestClass getTestClass()- Returns:
- the TestClass the testcase belongs to
-
setTestClass
Set the testClass this test case belongs to- Parameters:
testClass
- the test case belongs to
-
getMethodName
String getMethodName()Returns a sentence describing the test, derived from the method name of the test.- Returns:
- The sentence
-
getSuccessPercentage
double getSuccessPercentage()- Returns:
- how successful this test case has been. (success runs / total runs)
-
getTotalTestRuns
int getTotalTestRuns()- Returns:
- the total number of times this test has run.
-
getNumberOfSuccessRuns
int getNumberOfSuccessRuns()- Returns:
- the number of times this test has run successfully
-
setNumberOfSuccessRuns
void setNumberOfSuccessRuns(int numberOfSuccessRuns) -
getNumberOfSkippedRuns
int getNumberOfSkippedRuns()- Returns:
- the number of times this test has been skipped.
-
setNumberOfSkippedRuns
void setNumberOfSkippedRuns(int numberOfSkippedRuns) Set the number of runs this test has een skipped.- Parameters:
numberOfSkippedRuns
- the new number of skipped runs.
-
getNumberOfFailedRuns
int getNumberOfFailedRuns()- Returns:
- the number of times this test has run and failed
-
setNumberOfFailedRuns
void setNumberOfFailedRuns(int numberOfFailedRuns) -
getAverageDuration
long getAverageDuration()- Returns:
- the average duration in milliseconds of this test case for all test runs.
-
getAverageDurationInSeconds
long getAverageDurationInSeconds()- Returns:
- the average duration in seconds of this test case for all test runs.
-
setAverageDuration
void setAverageDuration(long averageDuration) -
getFirstRanBuildNumber
int getFirstRanBuildNumber()- Returns:
- the build number that this test was first run in.
-
setFirstRanBuildNumber
void setFirstRanBuildNumber(int firstRanBuildNumber) -
getLastRanBuildNumber
int getLastRanBuildNumber()- Returns:
- the most recent build (except for once-off builds) that this test was part of
-
setLastRanBuildNumber
void setLastRanBuildNumber(int lastRanBuildNumber) -
getLastRecordedBuildNumber
int getLastRecordedBuildNumber()- Returns:
- the most recent build (including once-off builds) that this test was part of
-
setLastRecordedBuildNumber
void setLastRecordedBuildNumber(int lastRecordedBuildNumber) -
copyTestCase
- Returns:
- copyOfTestCase
-
setQuarantineStatistics
-
setQuarantineStatistics
-
getQuarantineStatistics
-
isQuarantined
boolean isQuarantined() -
getLinkedJiraIssueKey
Tests can be linked to a specific jira issue. This is the issue key of that issue.- Returns:
-
setLinkedJiraIssueKey
-