Problem: I need to adapt the code from the Android Developer TestSuite example so that it runs all TestCases in the package except a few explicitly defined ones. Currently it just runs them all:
public class AllTests extends TestSuite {
public static Test suite() {
return new TestSuiteBuilder(AllTests.class)
.includeAllPackagesUnderHere()
.build();
}
}
Looking at the Docs for TestSuiteBuilder, perhaps I could adapt the above code by adding a call to TestSuiteBuilder's addRequirements() method, but I can't make heads or tails of if this will do it, or should be used to do it.
If addRequirements will and should be used to exclude AndroidTestCases, how do I call it? I don't understand what argument I'd pass, the documentation says:
addRequirements(Predicate...<TestMethod> predicates)
//Exclude tests that fail to satisfy all of the given predicates.
But I can't find anything about the existence of a class Predicate
or how it should be populated to achieve my goal.
Thanks