All Downloads are FREE. Search and download functionalities are using the official Maven repository.

listeners.RetryListener Maven / Gradle / Ivy

Go to download

A OyoTestLibs jar for deployment to the Central Repository via OSSRH

The newest version!
package com.oyo.listeners;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

import org.testng.IAnnotationTransformer;
import org.testng.IRetryAnalyzer;
import org.testng.annotations.ITestAnnotation;

/**
 * @author manish.kumar
 *
 */
public class RetryListener implements IAnnotationTransformer {

	/* (non-Javadoc)
	 * @see org.testng.IAnnotationTransformer#transform(org.testng.annotations.ITestAnnotation, java.lang.Class, java.lang.reflect.Constructor, java.lang.reflect.Method)
	 */
	@Override
	public void transform(ITestAnnotation testannotation, Class testClass, Constructor testConstructor, Method testMethod) {
		IRetryAnalyzer retry = testannotation.getRetryAnalyzer();

		if (retry == null)	{
			testannotation.setRetryAnalyzer(Retry.class);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy