Package testUtils
Class AnnotationTransformer
java.lang.Object
testUtils.AnnotationTransformer
- All Implemented Interfaces:
org.testng.IAnnotationTransformer
,org.testng.ITestNGListener
TestNG annotation transformer that automatically assigns a retry analyzer to test methods. This
enables automatic retry of failed tests based on custom logic in
RetryAnalyzer
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
transform
(org.testng.annotations.ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) Transforms the test annotation to set a retry analyzer if not already present.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.testng.IAnnotationTransformer
transform, transform, transform, transform
Methods inherited from interface org.testng.ITestNGListener
isEnabled
-
Constructor Details
-
AnnotationTransformer
public AnnotationTransformer()
-
-
Method Details
-
transform
public void transform(org.testng.annotations.ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) Transforms the test annotation to set a retry analyzer if not already present.- Specified by:
transform
in interfaceorg.testng.IAnnotationTransformer
- Parameters:
annotation
- the test annotationtestClass
- the test classtestConstructor
- the test constructortestMethod
- the test method
-