Class UnifiedTestNGListener
java.lang.Object
io.github.mov2day.unifiedtest.reporting.UnifiedTestNGListener
- All Implemented Interfaces:
org.testng.ITestListener,org.testng.ITestNGListener
TestNG test listener that integrates with UnifiedTest reporting.
Captures TestNG test execution events and forwards them to the UnifiedTest collector and reporter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonFinish(org.testng.ITestContext context) voidonStart(org.testng.ITestContext context) voidonTestFailedButWithinSuccessPercentage(org.testng.ITestResult result) voidonTestFailure(org.testng.ITestResult result) voidonTestSkipped(org.testng.ITestResult result) voidonTestStart(org.testng.ITestResult result) voidonTestSuccess(org.testng.ITestResult result) static voidsetCollectorAndReporter(UnifiedTestResultCollector collector, ConsoleReporter reporter) Sets the collector and reporter for the listener.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.ITestListener
onTestFailedWithTimeoutMethods inherited from interface org.testng.ITestNGListener
isEnabled
-
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 collectorreporter- the console reporter
-
onTestStart
public void onTestStart(org.testng.ITestResult result) - Specified by:
onTestStartin interfaceorg.testng.ITestListener
-
onTestSuccess
public void onTestSuccess(org.testng.ITestResult result) - Specified by:
onTestSuccessin interfaceorg.testng.ITestListener
-
onTestFailure
public void onTestFailure(org.testng.ITestResult result) - Specified by:
onTestFailurein interfaceorg.testng.ITestListener
-
onTestSkipped
public void onTestSkipped(org.testng.ITestResult result) - Specified by:
onTestSkippedin interfaceorg.testng.ITestListener
-
onTestFailedButWithinSuccessPercentage
public void onTestFailedButWithinSuccessPercentage(org.testng.ITestResult result) - Specified by:
onTestFailedButWithinSuccessPercentagein interfaceorg.testng.ITestListener
-
onStart
public void onStart(org.testng.ITestContext context) - Specified by:
onStartin interfaceorg.testng.ITestListener
-
onFinish
public void onFinish(org.testng.ITestContext context) - Specified by:
onFinishin interfaceorg.testng.ITestListener
-