Class UnifiedTestNGListener

java.lang.Object
io.github.mov2day.unifiedtest.reporting.UnifiedTestNGListener
All Implemented Interfaces:
org.testng.ITestListener, org.testng.ITestNGListener

public class UnifiedTestNGListener extends Object implements org.testng.ITestListener
TestNG test listener that integrates with UnifiedTest reporting. Captures TestNG test execution events and forwards them to the UnifiedTest collector and reporter.
  • Constructor Details

    • UnifiedTestNGListener

      public UnifiedTestNGListener()
  • Method Details

    • setCollectorAndReporter

      public static void setCollectorAndReporter(UnifiedTestResultCollector collector, ConsoleReporter reporter)
      Sets the collector and reporter for the listener. This method should be called before test execution starts.
      Parameters:
      collector - the test result collector
      reporter - the console reporter
    • 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