[
https://issues.apache.org/jira/browse/SUREFIRE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16981226#comment-16981226
]
M.P. Korstanje commented on SUREFIRE-1724:
------------------------------------------
> The interface {{org.junit.platform.engine.DiscoverySelector}} v1.3.2 is
> implemented by 10 default implementations.
That will be allot of typing to map the Junit Platform configuration to
classes. :D
> It would be worth to write a trivial GitHub project with your proposal
Have a look at: [https://github.com/mpkorstanje/surefire-1724-proposal] Main
class is the point to start.
It's a demo with Junit4, Junit5 and Cucumber. The latter two use the JUnit
Platform and all tests are discovered with a single discovery requests composed
of classes discovered by surefire and a class path root selector.
> I guess this might be a problem for some users but we are not there yet with
> our analysis.
Tests would be executed in a different fork so those effects should be gone. I
guess you may also not want to pollute surefire and run discovery in a fork too.
> 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)