01: package test.annotationtransformer;
02:
03: import java.lang.reflect.Constructor;
04: import java.lang.reflect.Method;
05:
06: import org.testng.internal.annotations.IAnnotationTransformer;
07: import org.testng.internal.annotations.ITest;
08:
09: public class MyTimeOutTransformer implements IAnnotationTransformer {
10:
11: public void transform(ITest annotation, Class testClass,
12: Constructor testConstructor, Method testMethod) {
13: annotation.setTimeOut(5000); // 5 seconds
14: }
15:
16: }
|