title: AspectJ pointcut to match methods annotated with @Test
body: <p>I am building a module that listens to TestNG tests and performs certain actions just before a test method starts its execution, for every test method. 
  I just want to know when a test(method) starts its execution, name of the method and optionally name of the test class.</p>
  
  <p>I was successfully able to write pointcuts for invoker calls of testNG. It worked.</p>
  
  <pre><code>@Pointcut("execution(* org.testng.internal.IInvoker.invokeTestMethods(..))")
  </code></pre>
  
  <p>Instead, I was wondering as every test method is annotated with <code>@org.testng.annotations.Test</code>, how can I write pointcut to catch execution joinPoint of every test method annotated with <code>@org.testng.annotations.Test</code>?</p>
  
  <p>Here is how my test looks like</p>
  
  <pre><code>@BeforeClass
      public void setup() {
         //setup logic
      }
      @BeforeMethod
      private void configure() {
          //config logic
      }
  
      @Test
      public void testLoad() {
      //test
      }
  
      @Test
      public void testForm() {
      //test
      }   
  </code></pre>
  
  <p>I tried a few pointcuts, they turned out to be invalid ones.
  <strong>Note:</strong> I am using load time weaving.</p>