I have the impression Junit4x support is somewhat limited in general for Ant.
maven-surefire ( http://maven.apache.org/plugins/maven-surefire-plugin/source-repository.html ) has a fairly complete JUnit4.7+ provider located at https://svn.apache.org/repos/asf/maven/surefire/trunk/surefire-providers/surefire-junit47/ You might want to take a look at that code for one way of solving these problems, otherwise I'd suggest the JUnit mailing list too. Kristian 2012/1/5 Noel Yap <[email protected]> > Hmm, it occurred to me that, while what I described might work for methods > specified on the command line, IIUC, it won't work for methods not > specified on the command line. It seems the best way to do what I want is > to create a Suite, call setFilter with the user-speficied Filters, create a > Request, then call Suite.run on the Request. Does this sound right? > > Thanks, > Noel > > On Wed, Jan 4, 2012 at 17:29, Noel Yap <[email protected]> wrote: > > > I'd like to extend JUnitTestRunner to allow specification of JUnit > > Filters. This would allow, for example, tests to be filtered by > Category. > > > > It looks like all I would need to do is to create a Description from the > > test class (or test class and method name) and annotations then pass it > > through a series of user-specified Filters. What objections might there > be > > by adding such a feature? Are there any gotchas with the approach I > > described? > > > > Thanks, > > Noel > > >
