Package testUtils

Class AnnotationTransformer

java.lang.Object
testUtils.AnnotationTransformer
All Implemented Interfaces:
org.testng.IAnnotationTransformer, org.testng.ITestNGListener

public class AnnotationTransformer extends Object implements org.testng.IAnnotationTransformer
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    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 interface org.testng.IAnnotationTransformer
      Parameters:
      annotation - the test annotation
      testClass - the test class
      testConstructor - the test constructor
      testMethod - the test method