title: quitting testNG tests programmatically
body: <p>How can I quit the complete test suite programmatically if a certain condition is met?</p>
  
  <p>I am checking for the condition in @AfterMethod and using the fail() method to fail the AfterMethod annotation. But the AfterMethod annotation gets executed as many times as the number of tests in my Test suite. The tests are skipped however.</p>
  
  <p>Is there a way to do this?</p>
  
  <p>Thank you,</p>
  
  <p>John</p>