Feature request: Expose API method which returns test classes found by TestClassDetecter

It would be great if there was an official API through which we could query the test classes found by org.gradle.api.internal.tasks.testing.junit.JUnitTestClassDetecter for a given test task. We need that information for two reasons:

  • In many places (plugins/subprojects closure), we need to treat subprojects with integration tests differently from subprojects without integration tests. Currently, it’s hard to find out whether the IT sourceSet contains actual tests or just abstract base classes and helpers.
  • We want to generate one JAR per subproject that runs all integration tests of that subproject.