com.atlassian.bamboo.resultsummary.tests
Class TestCaseImpl

java.lang.Object
  extended by com.atlassian.core.bean.EntityObject
      extended by com.atlassian.bamboo.core.BambooEntityObject
          extended by com.atlassian.bamboo.resultsummary.tests.TestCaseImpl
All Implemented Interfaces:
BambooIdProvider, BambooObject, TestCase, java.lang.Cloneable, java.lang.Comparable<TestCase>

public class TestCaseImpl
extends BambooEntityObject
implements TestCase


Field Summary
 
Fields inherited from class com.atlassian.bamboo.core.BambooEntityObject
id
 
Constructor Summary
TestCaseImpl()
           
TestCaseImpl(java.lang.String name)
           
TestCaseImpl(java.lang.String name, TestClass testClass)
           
 
Method Summary
 int compareTo(TestCase testCase)
           
 TestCase copyTestCase()
          Creates a copy of the TestCase.
 boolean equals(java.lang.Object o)
          This method needs to be here in order to use proper id
 long getAverageDuration()
           
 long getAverageDurationInSeconds()
           
 int getFirstRanBuildNumber()
           
 int getLastRanBuildNumber()
           
 java.lang.String getLinkedJiraIssue()
          Tests can be linked to a specific jira issue.
 java.lang.String getMethodName()
          Returns a sentence describing the test, derived from the method name of the test.
 java.lang.String getName()
           
 int getNumberOfFailedRuns()
           
 int getNumberOfSuccessRuns()
           
 QuarantineStatistics getQuarantineStatistics()
           
 double getSuccessPercentage()
           
 TestClass getTestClass()
           
 int getTotalTestRuns()
           
 int hashCode()
          This method needs to be here in order to use proper id
 boolean isQuarantined()
           
 void setAverageDuration(long averageDuration)
           
 void setFirstRanBuildNumber(int firstRanBuildNumber)
           
 void setLastRanBuildNumber(int lastRanBuildNumber)
           
 void setLinkedJiraIssue(java.lang.String issueKey)
           
protected  void setName(java.lang.String name)
           
 void setNumberOfFailedRuns(int numberOfFailedRuns)
           
 void setNumberOfSuccessRuns(int numberOfSuccessRuns)
           
 void setQuarantineStatistics(QuarantineStatistics quarantineStatistics)
           
 void setQuarantineStatistics(java.lang.String quarantineUser, java.util.Date quarantineDate)
           
 void setTestClass(TestClass testClass)
          Set the testClass this test case belongs to
 
Methods inherited from class com.atlassian.bamboo.core.BambooEntityObject
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.BambooObject
setId
 
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
 

Constructor Detail

TestCaseImpl

public TestCaseImpl()

TestCaseImpl

public TestCaseImpl(java.lang.String name)

TestCaseImpl

public TestCaseImpl(java.lang.String name,
                    TestClass testClass)
Method Detail

getMethodName

public java.lang.String getMethodName()
Description copied from interface: TestCase
Returns a sentence describing the test, derived from the method name of the test.

Specified by:
getMethodName in interface TestCase
Returns:
The sentence

getSuccessPercentage

public double getSuccessPercentage()
Specified by:
getSuccessPercentage in interface TestCase
Returns:
how successful this test case has been. (success runs / total runs)

getTotalTestRuns

public int getTotalTestRuns()
Specified by:
getTotalTestRuns in interface TestCase
Returns:
the total number of times this test has run.

getName

public java.lang.String getName()
Specified by:
getName in interface TestCase
Returns:
The true name of the test case

setName

protected void setName(java.lang.String name)

getTestClass

public TestClass getTestClass()
Specified by:
getTestClass in interface TestCase
Returns:
the TestClass the testcase belongs to

setTestClass

public void setTestClass(TestClass testClass)
Description copied from interface: TestCase
Set the testClass this test case belongs to

Specified by:
setTestClass in interface TestCase
Parameters:
testClass - the test case belongs to

getNumberOfSuccessRuns

public int getNumberOfSuccessRuns()
Specified by:
getNumberOfSuccessRuns in interface TestCase
Returns:
the number of times this test has run successfully

setNumberOfSuccessRuns

public void setNumberOfSuccessRuns(int numberOfSuccessRuns)
Specified by:
setNumberOfSuccessRuns in interface TestCase

getNumberOfFailedRuns

public int getNumberOfFailedRuns()
Specified by:
getNumberOfFailedRuns in interface TestCase
Returns:
the number of times this test has run and failed

setNumberOfFailedRuns

public void setNumberOfFailedRuns(int numberOfFailedRuns)
Specified by:
setNumberOfFailedRuns in interface TestCase

getAverageDuration

public long getAverageDuration()
Specified by:
getAverageDuration in interface TestCase
Returns:
the average duration in milliseconds of this test case for all test runs.

getAverageDurationInSeconds

public long getAverageDurationInSeconds()
Specified by:
getAverageDurationInSeconds in interface TestCase
Returns:
the average duration in seconds of this test case for all test runs.

setAverageDuration

public void setAverageDuration(long averageDuration)
Specified by:
setAverageDuration in interface TestCase

getFirstRanBuildNumber

public int getFirstRanBuildNumber()
Specified by:
getFirstRanBuildNumber in interface TestCase
Returns:
the build number that this test was first run in.

setFirstRanBuildNumber

public void setFirstRanBuildNumber(int firstRanBuildNumber)
Specified by:
setFirstRanBuildNumber in interface TestCase

getLastRanBuildNumber

public int getLastRanBuildNumber()
Specified by:
getLastRanBuildNumber in interface TestCase
Returns:
the most recent build that this test was part of

setLastRanBuildNumber

public void setLastRanBuildNumber(int lastRanBuildNumber)
Specified by:
setLastRanBuildNumber in interface TestCase

isQuarantined

public boolean isQuarantined()
Specified by:
isQuarantined in interface TestCase

setQuarantineStatistics

public void setQuarantineStatistics(@NotNull
                                    java.lang.String quarantineUser,
                                    @NotNull
                                    java.util.Date quarantineDate)
Specified by:
setQuarantineStatistics in interface TestCase

setQuarantineStatistics

public void setQuarantineStatistics(@Nullable
                                    QuarantineStatistics quarantineStatistics)
Specified by:
setQuarantineStatistics in interface TestCase

getQuarantineStatistics

@Nullable
public QuarantineStatistics getQuarantineStatistics()
Specified by:
getQuarantineStatistics in interface TestCase

getLinkedJiraIssue

public java.lang.String getLinkedJiraIssue()
Description copied from interface: TestCase
Tests can be linked to a specific jira issue. This is the issue key of that issue.

Specified by:
getLinkedJiraIssue in interface TestCase
Returns:

setLinkedJiraIssue

public void setLinkedJiraIssue(@Nullable
                               java.lang.String issueKey)
Specified by:
setLinkedJiraIssue in interface TestCase

copyTestCase

@NotNull
public TestCase copyTestCase()
Description copied from interface: TestCase
Creates a copy of the TestCase. Note that it does not include TestClass

Specified by:
copyTestCase in interface TestCase
Returns:
copyOfTestCase

hashCode

public int hashCode()
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
hashCode in class BambooEntityObject

equals

public boolean equals(java.lang.Object o)
Description copied from class: BambooEntityObject
This method needs to be here in order to use proper id

Overrides:
equals in class BambooEntityObject

compareTo

public int compareTo(TestCase testCase)
Specified by:
compareTo in interface java.lang.Comparable<TestCase>


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.