Class TestListener

java.lang.Object
com.anhtester.listeners.TestListener
All Implemented Interfaces:
org.testng.IInvokedMethodListener, org.testng.ISuiteListener, org.testng.ITestListener, org.testng.ITestNGListener

public class TestListener extends Object implements org.testng.ITestListener, org.testng.ISuiteListener, org.testng.IInvokedMethodListener
  • Constructor Details

    • TestListener

      public TestListener()
  • Method Details

    • getTestName

      public String getTestName(org.testng.ITestResult result)
    • getTestDescription

      public String getTestDescription(org.testng.ITestResult result)
    • beforeInvocation

      public void beforeInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult testResult)
      Specified by:
      beforeInvocation in interface org.testng.IInvokedMethodListener
    • afterInvocation

      public void afterInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult testResult)
      Specified by:
      afterInvocation in interface org.testng.IInvokedMethodListener
    • onStart

      public void onStart(org.testng.ISuite iSuite)
      Specified by:
      onStart in interface org.testng.ISuiteListener
    • onFinish

      public void onFinish(org.testng.ISuite iSuite)
      Specified by:
      onFinish in interface org.testng.ISuiteListener
    • getAuthorType

      public AuthorType[] getAuthorType(org.testng.ITestResult iTestResult)
    • getCategoryType

      public CategoryType[] getCategoryType(org.testng.ITestResult iTestResult)
    • 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