title: How do I skip methods using @AfterMethod in TestNG
body: <p>I have a set of tests as follows.</p>
  
  <pre><code>@Test
  public void testX(){
  }
  
  @Test
  public void testY(){
  }
  
  @Test
  public void testZ(){
  }
  </code></pre>
  
  <p>I have another test which I should run after each of the test is executed.
  I hope I could do that with</p>
  
  <pre><code>@AfterMethod
  public void testA(){
  }
  </code></pre>
  
  <p>Now I need to skip <code>testA</code> for <code>testX</code>. Which means I don't need <code>testA</code> to run after <code>testX</code>. How do I do it? Also how to specify multiple test cases to skip in the above manner?</p>