Class TestCaseImpl

    • Constructor Detail

      • TestCaseImpl

        public TestCaseImpl()
      • TestCaseImpl

        public TestCaseImpl​(String name)
    • Method Detail

      • getMethodName

        public 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 String getName()
        Specified by:
        getName in interface TestCase
        Returns:
        The true name of the test case
      • setNameAndTruncate

        protected void setNameAndTruncate​(String name)
      • setName

        protected void setName​(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
      • getNumberOfSkippedRuns

        public int getNumberOfSkippedRuns()
        Specified by:
        getNumberOfSkippedRuns in interface TestCase
        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 interface TestCase
        Parameters:
        numberOfSkippedRuns - the new number of skipped runs.
      • 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 (except for once-off builds) that this test was part of
      • setLastRanBuildNumber

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

        public int getLastRecordedBuildNumber()
        Specified by:
        getLastRecordedBuildNumber in interface TestCase
        Returns:
        the most recent build (including once-off builds) that this test was part of
      • setQuarantineStatistics

        public void setQuarantineStatistics​(@NotNull
                                            @NotNull String quarantineUser,
                                            @NotNull
                                            @NotNull Date quarantineDate,
                                            @Nullable
                                            @Nullable Date quarantineExpiryDate)
        Specified by:
        setQuarantineStatistics in interface TestCase
      • getLinkedJiraIssueKey

        public String 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 interface TestCase
        Returns:
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.atlassian.core.bean.EntityObject
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.atlassian.core.bean.EntityObject