com.atlassian.bamboo.resultsummary.tests
Class TestCaseImpl
java.lang.Object
com.atlassian.core.bean.EntityObject
com.atlassian.bamboo.core.BambooEntityObject
com.atlassian.bamboo.resultsummary.tests.TestCaseImpl
- All Implemented Interfaces:
- BambooObject, TestCase, java.lang.Cloneable, java.lang.Comparable<TestCase>
public class TestCaseImpl
- extends BambooEntityObject
- implements TestCase
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 |
TestCaseImpl
public TestCaseImpl()
TestCaseImpl
public TestCaseImpl(java.lang.String name)
TestCaseImpl
public TestCaseImpl(java.lang.String name,
TestClass testClass)
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
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()
- Overrides:
hashCode
in class com.atlassian.core.bean.EntityObject
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class com.atlassian.core.bean.EntityObject
compareTo
public int compareTo(TestCase testCase)
- Specified by:
compareTo
in interface java.lang.Comparable<TestCase>
Copyright © 2010 Atlassian. All Rights Reserved.