55import org .aspectj .lang .JoinPoint ;
66import org .aspectj .lang .annotation .Aspect ;
77import org .aspectj .lang .annotation .Before ;
8- import org .aspectj .lang .annotation .Pointcut ;
98import org .aspectj .lang .reflect .MethodSignature ;
109
1110import java .util .Objects ;
@@ -18,36 +17,12 @@ public class Allure1TestCaseAspects {
1817
1918 private static AllureLifecycle lifecycle ;
2019
21- /**
22- * Pointcut for things annotated with {@link org.junit.Test}.
23- */
24- @ Pointcut ("@annotation(org.junit.Test)" )
25- public void withJunitAnnotation () {
26- //pointcut body, should be empty
27- }
28-
29- /**
30- * Pointcut for things annotated with {@link org.testng.annotations.Test}.
31- */
32- @ Pointcut ("@annotation(org.testng.annotations.Test)" )
33- public void withTestNgAnnotation () {
34- //pointcut body, should be empty
35- }
36-
37- /**
38- * Pointcut for any methods.
39- */
40- @ Pointcut ("execution(* *(..))" )
41- public void anyMethod () {
42- //pointcut body, should be empty
43- }
44-
45- @ Before ("anyMethod() && withJunitAnnotation()" )
20+ @ Before ("execution(@org.junit.Test * *.*(..))" )
4621 public void junitTestStart (final JoinPoint joinPoint ) {
4722 updateTestCase (joinPoint );
4823 }
4924
50- @ Before ("anyMethod() && withTestNgAnnotation( )" )
25+ @ Before ("execution(@org.testng.annotations.Test * *.*(..) )" )
5126 public void testNgTestStart (final JoinPoint joinPoint ) {
5227 updateTestCase (joinPoint );
5328 }
0 commit comments