title: Can I specify a class wide group on a TestNG test case?
body: <p>I have a base class that represents a database test in TestNG, and I want to specify that all classes extending from this class are of a group "db-test", however I have found that this doesn't seem possible.  I have tried the @Test annotation:</p>
  
  <pre><code>@Test(groups = { "db-test" })
  public class DBTestBase {
  }
  </code></pre>
  
  <p>However, this doesn't work because the @Test annotation will try to make a bunch of methods into tests, and warnings/errors pop up in eclipse when the tests are run.</p>
  
  <p>So I tried disabling the test, so at least the groups are assigned:</p>
  
  <pre><code>@Test(enabled = false, groups = { "db-test" })
  public class DBTestBase {
  }
  </code></pre>
  
  <p>but then any @BeforeTest (and other similar annotations) ALSO get disabled... which is of course not what I want.</p>
  
  <p>I would like some way to annotate a class as being of a particular type of group, but it doesn't quite seem possible in TestNG.  Does anyone have any other ideas?</p>