Package org.testng

Class TestListenerAdapter

    • Field Detail

      • m_allTestMethods

        private java.util.Collection<ITestNGMethod> m_allTestMethods
      • m_passedTests

        private java.util.Collection<ITestResult> m_passedTests
      • m_failedTests

        private java.util.Collection<ITestResult> m_failedTests
      • m_skippedTests

        private java.util.Collection<ITestResult> m_skippedTests
      • m_failedButWSPerTests

        private java.util.Collection<ITestResult> m_failedButWSPerTests
      • m_testContexts

        private java.util.Collection<ITestContext> m_testContexts
      • m_failedConfs

        private java.util.Collection<ITestResult> m_failedConfs
      • m_skippedConfs

        private java.util.Collection<ITestResult> m_skippedConfs
      • m_passedConfs

        private java.util.Collection<ITestResult> m_passedConfs
      • m_timedOutTests

        private java.util.Collection<ITestResult> m_timedOutTests
    • Constructor Detail

      • TestListenerAdapter

        public TestListenerAdapter()
    • Method Detail

      • onTestFailedWithTimeout

        public void onTestFailedWithTimeout​(ITestResult tr)
        Description copied from interface: ITestListener
        Invoked each time a test fails due to a timeout.
        Specified by:
        onTestFailedWithTimeout in interface ITestListener
        Parameters:
        tr - ITestResult containing information about the run test
      • getAllTestMethods

        protected ITestNGMethod[] getAllTestMethods()
      • onStart

        public void onStart​(ITestContext testContext)
        Description copied from interface: ITestListener
        Invoked before running all the test methods belonging to the classes inside the <test> tag and calling all their Configuration methods.
        Specified by:
        onStart in interface ITestListener
        Parameters:
        testContext - The test context
      • onFinish

        public void onFinish​(ITestContext testContext)
        Description copied from interface: ITestListener
        Invoked after all the test methods belonging to the classes inside the <test> tag have run and all their Configuration methods have been called.
        Specified by:
        onFinish in interface ITestListener
        Parameters:
        testContext - The test context
      • getFailedButWithinSuccessPercentageTests

        public java.util.List<ITestResult> getFailedButWithinSuccessPercentageTests()
        Returns:
        Returns the failedButWithinSuccessPercentageTests.
      • getFailedTests

        public java.util.List<ITestResult> getFailedTests()
        Returns:
        Returns the failedTests.
      • getPassedTests

        public java.util.List<ITestResult> getPassedTests()
        Returns:
        Returns the passedTests.
      • getSkippedTests

        public java.util.List<ITestResult> getSkippedTests()
        Returns:
        Returns the skippedTests.
      • getTimedoutTests

        public java.util.Collection<ITestResult> getTimedoutTests()
        Returns:
        Returns the tests that failed due to a timeout
      • setAllTestMethods

        public void setAllTestMethods​(java.util.List<ITestNGMethod> allTestMethods)
        Parameters:
        allTestMethods - The allTestMethods to set.
      • setFailedButWithinSuccessPercentageTests

        public void setFailedButWithinSuccessPercentageTests​(java.util.List<ITestResult> failedButWithinSuccessPercentageTests)
        Parameters:
        failedButWithinSuccessPercentageTests - The failedButWithinSuccessPercentageTests to set.
      • setFailedTests

        public void setFailedTests​(java.util.List<ITestResult> failedTests)
        Parameters:
        failedTests - The failedTests to set.
      • setPassedTests

        public void setPassedTests​(java.util.List<ITestResult> passedTests)
        Parameters:
        passedTests - The passedTests to set.
      • setSkippedTests

        public void setSkippedTests​(java.util.List<ITestResult> skippedTests)
        Parameters:
        skippedTests - The skippedTests to set.
      • onTestStart

        public void onTestStart​(ITestResult result)
        Description copied from interface: ITestListener
        Invoked each time before a test will be invoked. The ITestResult is only partially filled with the references to class, method, start millis and status.
        Specified by:
        onTestStart in interface ITestListener
        Parameters:
        result - the partially filled ITestResult
        See Also:
        ITestResult.STARTED
      • getTestContexts

        public java.util.List<ITestContext> getTestContexts()
      • getConfigurationFailures

        public java.util.List<ITestResult> getConfigurationFailures()
      • getConfigurationSkips

        public java.util.List<ITestResult> getConfigurationSkips()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object