I’m am trying to run a single test suite. Defined in the test suite are ClasspathSuite filters with classes inclusions and exclusions. However when I attempt to run this suite from gradle it returns no tests found to run. I can execute the same testsuite from ant and it succeeds.
I believe the issue is because gradle filters the tests on the class path to only have the specified test suite before ClasspathSuite ever gets to filter it. What I would like to do is execute the test suite with the full class path without filtering.
Thanks for the help.
task runTests(type: Test) {
outputs.upToDateWhen { false }
testClassesDir = sourceSets.main.output.classesDir
classpath = sourceSets.test.runtimeClasspath
include 'MyTestSuite.class'
}
@RunWith(ClasspathSuite.class)
@SuiteTypes({SuiteType.TEST_CLASSES})
@ClasspathSuite.ClassnameFilters({
"!.*services.*",
"!.*helpers.*"
})
public class MyTestSuite{
}