Class XrayListener

java.lang.Object
app.getxray.xray.testng.listeners.XrayListener
All Implemented Interfaces:
org.testng.IInvokedMethodListener, org.testng.ITestListener, org.testng.ITestNGListener

public class XrayListener extends Object implements org.testng.IInvokedMethodListener, org.testng.ITestListener
The listener interface for receiving events related to execution of tests, and process Xray related annotations. The listener can be automatically invoked when TestNG tests are run by using ServiceLoader mechanism. You can also add this listener to a TestNG Test class by adding @Listeners({app.getxray.testng.XrayListener.class}) before the test class
See Also:
  • Constructor Details

    • XrayListener

      public XrayListener()
  • Method Details

    • 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
    • onTestStart

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

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

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

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

      public void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult result)
      Specified by:
      onTestFailedButWithinSuccessPercentage in interface org.testng.ITestListener
    • onStart

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

      public void onFinish(org.testng.ITestContext context)
      Specified by:
      onFinish in interface org.testng.ITestListener