Package io.qameta.allure.testng
Class AllureTestNgTestFilter
java.lang.Object
io.qameta.allure.testng.AllureTestNgTestFilter
- All Implemented Interfaces:
org.testng.IMethodInterceptor,org.testng.ITestNGListener
Filters TestNG methods using an Allure test plan.
TestNG calls this interceptor before execution. It keeps only methods selected by the configured Allure test plan so local and CI runs execute the requested subset.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an Allure test ng test filter with default configuration.AllureTestNgTestFilter(io.qameta.allure.testfilter.TestPlan testPlan) Creates an Allure test ng test filter with the supplied values. -
Method Summary
Modifier and TypeMethodDescriptionList<org.testng.IMethodInstance> booleanisSelected(org.testng.IMethodInstance instance) Returns whether selected.booleanisSelected(org.testng.ITestNGMethod method) Returns whether selected.booleanisSelected(org.testng.ITestNGMethod testNGMethod, io.qameta.allure.testfilter.TestPlanV1_0 testPlan) Returns whether selected.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testng.ITestNGListener
isEnabled
-
Constructor Details
-
AllureTestNgTestFilter
public AllureTestNgTestFilter()Creates an Allure test ng test filter with default configuration. -
AllureTestNgTestFilter
public AllureTestNgTestFilter(io.qameta.allure.testfilter.TestPlan testPlan) Creates an Allure test ng test filter with the supplied values.- Parameters:
testPlan- the Allure test plan to evaluate against
-
-
Method Details
-
intercept
public List<org.testng.IMethodInstance> intercept(List<org.testng.IMethodInstance> methods, org.testng.ITestContext context) - Specified by:
interceptin interfaceorg.testng.IMethodInterceptor
-
isSelected
public boolean isSelected(org.testng.IMethodInstance instance) Returns whether selected.- Parameters:
instance- the TestNG method instance to evaluate- Returns:
- true when selected; false otherwise
-
isSelected
public boolean isSelected(org.testng.ITestNGMethod method) Returns whether selected.- Parameters:
method- the framework or Java method to inspect- Returns:
- true when selected; false otherwise
-
isSelected
public boolean isSelected(org.testng.ITestNGMethod testNGMethod, io.qameta.allure.testfilter.TestPlanV1_0 testPlan) Returns whether selected.- Parameters:
testNGMethod- the TestNG method to evaluatetestPlan- the Allure test plan to evaluate against- Returns:
- true when selected; false otherwise
-