Though it does not really solve your immediate problem, I find it a very useful general practice to create suites and suites of suites, e.g. for a package something like PackageFooSuite
etc. and assemble these suites in one or more suites again, like ModuleFooSuite
and have one top-level suite, like AllTestsSuite
. That way it’s easy to run both all tests in one step as well as submodule tests for the package I’m currently working on (and have the tests run quicker than if I would always run all of them):
@RunWith(Suite.class)
@Suite.SuiteClasses({ PackageFooSuite.class, PackageBarSuite.class} )
public final class AllTestsSuite {} // or ModuleFooSuite, and that in AllTests