title: How to seperate unit and integration tests in testng + maven using annotations?
body: <p>The maven fail-safe plugin needs to be able to tell the difference between unit tests and integration tests. It seems that when using JUnit one way to separate tests is to use JUnit @Categories annotation. This blog post show how to do this using junit <a href="http://www.agile-engineering.net/2012/04/unit-and-integration-tests-with-maven.html" rel="noreferrer">http://www.agile-engineering.net/2012/04/unit-and-integration-tests-with-maven.html</a> </p>
  
  <pre><code>@Category(IntegrationTest.class)
  public class ExampleIntegrationTest{
  
   @Test
   public void longRunningServiceTest() throws Exception {
  
   }
  }
  </code></pre>
  
  <p>How can I accomplish the same same thing with TestNG and Maven failsafe plugin. I want to use annotations on the test classes to mark them as integration tests.</p>