title: How to run all tests belonging to a certain Category in JUnit 4
body: <p>JUnit 4.8 contains a nice new feature called "Categories" that allows you to group certain kinds of tests together. This is very useful, e.g. to have separate test runs for slow and fast tests. I know the stuff mentioned in <a href="https://github.com/junit-team/junit/blob/master/doc/ReleaseNotes4.8.html" rel="noreferrer">JUnit 4.8 release notes</a>, but would like to know how I can actually run all the tests annotated with certain category.</p>
  
  <p>The JUnit 4.8 release notes show an example suite definition, where SuiteClasses annotation selects the tests from certain category to run, like this:</p>
  
  <pre><code>@RunWith(Categories.class)
  @IncludeCategory(SlowTests.class)
  @SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suite
  public class SlowTestSuite {
    // Will run A.b and B.c, but not A.a
  }
  </code></pre>
  
  <p>Does anyone know how I could run all the tests in SlowTests category? It seems that you must have the SuiteClasses annotation...</p>