DiscoveryRequest(selectors: List<DiscoverySelector> = emptyList(), filters: List<DiscoveryFilter> = emptyList())
DiscoveryRequest describes how to discover test classes.
Selectors are instances of DiscoverySelector and are used to locate Specs. For example, a Spec may be referred to by name via a DiscoverySelector.ClassDiscoverySelector, or all specs in a package may be referred to via a DiscoverySelector.PackageDiscoverySelector. Selectors stack, so each selector may contribute zero or more specs and all discovered specs are returned.
Filters are instances of DiscoveryFilter and are applied to the discovered set of Specs. All of them have to include a resource for it to end up in the test plan. For example, you may filter specs by a DiscoveryFilter.ClassNameDiscoveryFilter where any specs that do not have a matching name are removed. In addition, you could apply a DiscoveryFilter.PackageNameDiscoveryFilter and all specs not in the specified packages would be removed.