Package io.qameta.allure.testng
Class AllureTestNg
java.lang.Object
io.qameta.allure.testng.AllureTestNg
- All Implemented Interfaces:
org.testng.IConfigurationListener,org.testng.IDataProviderListener,org.testng.IInvokedMethodListener,org.testng.IMethodInterceptor,org.testng.ISuiteListener,org.testng.ITestListener,org.testng.ITestNGListener
public class AllureTestNg
extends Object
implements org.testng.ISuiteListener, org.testng.ITestListener, org.testng.IInvokedMethodListener, org.testng.IConfigurationListener, org.testng.IMethodInterceptor, org.testng.IDataProviderListener
Reports TestNG execution to Allure.
Register this listener with TestNG to translate suites, test contexts, classes, configuration methods, data providers, and test methods into Allure containers, fixtures, and test results. It also applies Allure test plan filtering when a plan is configured.
-
Constructor Summary
ConstructorsConstructorDescriptionAllureTestNg(io.qameta.allure.AllureLifecycle lifecycle) AllureTestNg(io.qameta.allure.AllureLifecycle lifecycle, AllureTestNgTestFilter testFilter) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterDataProviderExecution(org.testng.IDataProviderMethod dataProviderMethod, org.testng.ITestNGMethod method, org.testng.ITestContext iTestContext) voidafterInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult testResult) voidbeforeDataProviderExecution(org.testng.IDataProviderMethod dataProviderMethod, org.testng.ITestNGMethod method, org.testng.ITestContext iTestContext) voidbeforeInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult testResult) protected voidcreateFakeResult(org.testng.ITestContext context, org.testng.ITestNGMethod method) protected StringgetHistoryId(org.testng.ITestNGMethod method, List<io.qameta.allure.model.Parameter> parameters) io.qameta.allure.AllureLifecycleprotected io.qameta.allure.model.StatusList<org.testng.IMethodInstance> voidonAfterClass(org.testng.ITestClass testClass) voidonBeforeClass(org.testng.ITestClass testClass) voidonConfigurationFailure(org.testng.ITestResult itr) voidonConfigurationSkip(org.testng.ITestResult itr) voidonConfigurationSuccess(org.testng.ITestResult itr) voidonDataProviderFailure(org.testng.ITestNGMethod method, org.testng.ITestContext ctx, RuntimeException t) voidonFinish(org.testng.ISuite suite) voidonFinish(org.testng.ITestContext context) voidonStart(org.testng.ISuite suite) voidonStart(org.testng.ITestContext context) voidonTestFailedButWithinSuccessPercentage(org.testng.ITestResult result) voidonTestFailure(org.testng.ITestResult result) voidonTestSkipped(org.testng.ITestResult result) voidonTestStart(org.testng.ITestResult testResult) voidonTestSuccess(org.testng.ITestResult testResult) protected booleanshouldSkipReportingFor(org.testng.ITestResult testResult) protected voidstartTestCase(org.testng.ITestContext context, org.testng.ITestNGMethod method, org.testng.IClass iClass, Object[] params, String parentUuid, String uuid) protected voidstartTestCase(org.testng.ITestResult testResult, String parentUuid, String uuid) protected voidstopTestCase(String uuid, Throwable throwable, io.qameta.allure.model.Status status) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.IConfigurationListener
beforeConfiguration, beforeConfiguration, onConfigurationFailure, onConfigurationSkip, onConfigurationSuccessMethods inherited from interface org.testng.IInvokedMethodListener
afterInvocation, beforeInvocationMethods inherited from interface org.testng.ITestListener
onTestFailedWithTimeoutMethods inherited from interface org.testng.ITestNGListener
isEnabled
-
Constructor Details
-
AllureTestNg
-
AllureTestNg
public AllureTestNg(io.qameta.allure.AllureLifecycle lifecycle) -
AllureTestNg
public AllureTestNg()
-
-
Method Details
-
getLifecycle
public io.qameta.allure.AllureLifecycle getLifecycle() -
intercept
public List<org.testng.IMethodInstance> intercept(List<org.testng.IMethodInstance> methods, org.testng.ITestContext context) - Specified by:
interceptin interfaceorg.testng.IMethodInterceptor
-
onStart
public void onStart(org.testng.ISuite suite) - Specified by:
onStartin interfaceorg.testng.ISuiteListener
-
onStart
public void onStart(org.testng.ITestContext context) - Specified by:
onStartin interfaceorg.testng.ITestListener
-
createFakeResult
protected void createFakeResult(org.testng.ITestContext context, org.testng.ITestNGMethod method) -
onFinish
public void onFinish(org.testng.ISuite suite) - Specified by:
onFinishin interfaceorg.testng.ISuiteListener
-
onFinish
public void onFinish(org.testng.ITestContext context) - Specified by:
onFinishin interfaceorg.testng.ITestListener
-
onBeforeClass
public void onBeforeClass(org.testng.ITestClass testClass) -
onAfterClass
public void onAfterClass(org.testng.ITestClass testClass) -
onTestStart
public void onTestStart(org.testng.ITestResult testResult) - Specified by:
onTestStartin interfaceorg.testng.ITestListener
-
shouldSkipReportingFor
protected boolean shouldSkipReportingFor(org.testng.ITestResult testResult) -
startTestCase
-
startTestCase
-
onTestSuccess
public void onTestSuccess(org.testng.ITestResult testResult) - Specified by:
onTestSuccessin interfaceorg.testng.ITestListener
-
onTestFailure
public void onTestFailure(org.testng.ITestResult result) - Specified by:
onTestFailurein interfaceorg.testng.ITestListener
-
stopTestCase
-
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
-
beforeInvocation
public void beforeInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult testResult) - Specified by:
beforeInvocationin interfaceorg.testng.IInvokedMethodListener
-
afterInvocation
public void afterInvocation(org.testng.IInvokedMethod method, org.testng.ITestResult testResult) - Specified by:
afterInvocationin interfaceorg.testng.IInvokedMethodListener
-
onConfigurationSuccess
public void onConfigurationSuccess(org.testng.ITestResult itr) - Specified by:
onConfigurationSuccessin interfaceorg.testng.IConfigurationListener
-
onConfigurationFailure
public void onConfigurationFailure(org.testng.ITestResult itr) - Specified by:
onConfigurationFailurein interfaceorg.testng.IConfigurationListener
-
onConfigurationSkip
public void onConfigurationSkip(org.testng.ITestResult itr) - Specified by:
onConfigurationSkipin interfaceorg.testng.IConfigurationListener
-
beforeDataProviderExecution
public void beforeDataProviderExecution(org.testng.IDataProviderMethod dataProviderMethod, org.testng.ITestNGMethod method, org.testng.ITestContext iTestContext) - Specified by:
beforeDataProviderExecutionin interfaceorg.testng.IDataProviderListener
-
afterDataProviderExecution
public void afterDataProviderExecution(org.testng.IDataProviderMethod dataProviderMethod, org.testng.ITestNGMethod method, org.testng.ITestContext iTestContext) - Specified by:
afterDataProviderExecutionin interfaceorg.testng.IDataProviderListener
-
onDataProviderFailure
public void onDataProviderFailure(org.testng.ITestNGMethod method, org.testng.ITestContext ctx, RuntimeException t) - Specified by:
onDataProviderFailurein interfaceorg.testng.IDataProviderListener
-
getHistoryId
-
getStatus
-