[
https://issues.apache.org/jira/browse/SUREFIRE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16981270#comment-16981270
]
M.P. Korstanje commented on SUREFIRE-1724:
------------------------------------------
> You mean that the Cucumber has its own selector classes?
No. Cucumber does not have it's own selectors.
While it is possible for a test engine to implement custom selectors. I think
we should stick to those provided by the JUnit Platform.
> Is it fast to look up in every Jar file?
This would be TestEngine specific. I have not benchmarked this but I would
expect Cucumber to be reasonably fast.
Though in practice I don't think we'll scan every jar on the class path. We
have to provide an explicit set of class path roots. I can see some use cases
for adding all jar file dependencies, but I think that for most cases using
{{${build.testOutputDirectory}}} as the classpath root should be sufficient.
> I guess that the user would not code the selector by himself in
> {{target/classes}}.
Yeah. This would be configured in the pom file. Marc Philipp did a
suggestion for the syntax in
https://issues.apache.org/jira/browse/SUREFIRE-1337
Based on that we could start with something like for the classpath root and
maybe add something a little bit nicer later on:
{code:java}
selector>
<classpathroots>
<classpathroot>${build.testOutputDirectory}</classpathroot>
</classpathroots>
</selectors>
{code}
> Support JUnit Platform DiscoverySelectors
> ------------------------------------------
>
> Key: SUREFIRE-1724
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1724
> Project: Maven Surefire
> Issue Type: Improvement
> Reporter: M.P. Korstanje
> Priority: Major
>
> The JUnit Platform defines multiple
> [DiscoverySelectors|https://junit.org/junit5/docs/5.0.2/api/org/junit/platform/engine/DiscoverySelector.html]
> to discover tests in different locations. This allows TestEngines to
> discover tests in classes, the class path root, resource root, files, ect.
> Currently Surefire supports TestEngine implementations through the
> JUnitPlatformProvider. However the JUnitPlatformProvider only issues
> discovery requests for classes that have already been discovered by Surefire.
> Additionally if no tests were discovered by Surefire then no test discovery
> requests will be issued at all.
> This means that Surefire does not fully utilize the discovery capabilities of
> the JUnit Platform and makes it impossible to use the JUnitPlatformProvider
> for test frameworks that do not have class based tests such as Cucumber.
> To make Cucumber work at the very least the class path root discovery
> selector would have to be supported.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)