Class TestListener

  • All Implemented Interfaces:
    org.testng.IClassListener, org.testng.IConfigurationListener, org.testng.ISuiteListener, org.testng.ITestListener, org.testng.ITestNGListener

    public class TestListener
    extends Object
    implements org.testng.ITestListener, org.testng.IClassListener, org.testng.ISuiteListener, org.testng.IConfigurationListener
    • Constructor Detail

      • TestListener

        public TestListener()
    • Method Detail

      • onStart

        public void onStart​(org.testng.ITestContext iTestContext)
        Specified by:
        onStart in interface org.testng.ITestListener
      • onFinish

        public void onFinish​(org.testng.ITestContext iTestContext)
        After ending all tests, below method runs. The report is launched after the test suit finishes
        Specified by:
        onFinish in interface org.testng.ITestListener
      • onTestStart

        public void onTestStart​(org.testng.ITestResult iTestResult)
        Specified by:
        onTestStart in interface org.testng.ITestListener
      • onTestSuccess

        public void onTestSuccess​(org.testng.ITestResult iTestResult)
        Specified by:
        onTestSuccess in interface org.testng.ITestListener
      • onTestFailure

        public void onTestFailure​(org.testng.ITestResult iTestResult)
        Specified by:
        onTestFailure in interface org.testng.ITestListener
      • onTestSkipped

        public void onTestSkipped​(org.testng.ITestResult iTestResult)
        Specified by:
        onTestSkipped in interface org.testng.ITestListener
      • onTestFailedButWithinSuccessPercentage

        public void onTestFailedButWithinSuccessPercentage​(org.testng.ITestResult iTestResult)
        Specified by:
        onTestFailedButWithinSuccessPercentage in interface org.testng.ITestListener
      • cleanupProcessess

        public void cleanupProcessess()
        kills all process for clean start
      • generateTestMessage

        public String generateTestMessage​(org.testng.ITestContext iTestContext)
      • onBeforeClass

        public void onBeforeClass​(org.testng.ITestClass testClass)
        Specified by:
        onBeforeClass in interface org.testng.IClassListener
      • onAfterClass

        public void onAfterClass​(org.testng.ITestClass testClass)
        Specified by:
        onAfterClass in interface org.testng.IClassListener
      • onConfigurationSuccess

        public void onConfigurationSuccess​(org.testng.ITestResult itr)
        Specified by:
        onConfigurationSuccess in interface org.testng.IConfigurationListener
      • onConfigurationFailure

        public void onConfigurationFailure​(org.testng.ITestResult itr)
        Specified by:
        onConfigurationFailure in interface org.testng.IConfigurationListener
      • onConfigurationSkip

        public void onConfigurationSkip​(org.testng.ITestResult itr)
        Specified by:
        onConfigurationSkip in interface org.testng.IConfigurationListener
      • setTestClassName

        public void setTestClassName​(org.testng.ITestResult iTestResult)
      • onStart

        public void onStart​(org.testng.ISuite suite)
        onStart (suite) runs before onStart(ItestContext)
        Specified by:
        onStart in interface org.testng.ISuiteListener
      • onFinish

        public void onFinish​(org.testng.ISuite suite)
        Specified by:
        onFinish in interface org.testng.ISuiteListener
      • runFailedTests

        public void runFailedTests​(org.testng.ISuite suite)
        runs failed tests at end of suite updates junit report and extent test report areas affected: JunitReportReporter.java, ExtentManager.java