Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move JUnitPlatform, SelectPackages and SelectClasses to a public API #498

Closed
smoyer64 opened this issue Sep 8, 2016 · 7 comments
Closed
Assignees

Comments

@smoyer64
Copy link
Contributor

smoyer64 commented Sep 8, 2016

Separating the JUnit 5 API from it's implementation provides a concise way for a test writer to know what classes can safely be used when writing tests. Pull request junit-team/junit5-samples#16 changes the Maven POM to only expose the JUnit 5 public APIs to test writers when using the Maven build system as the test runner.

As soon as you you also want to run these tests using a JUnit 4 runner (whether using the console or via Eclipse), you have to add the junit-platform-runner and the junit-jupiter-engine to the test-compile classpath. This results in the minimal dependencies shown in the referenced PR to expand to a large number of non-public classes as shown below:

junit5-maven-consumer-minimal-with-junit-4

@marcphilipp
Copy link
Member

@smoyer64 I'm not sure I understand what you're asking for in this issue. You want to somehow minimize the dependencies... but how exactly?

@sbrannen
Copy link
Member

I'm also confused: JUnitPlatform, @SelectPackages, and @SelectClasses are already public APIs that make the up the programming model for anyone who needs to use JUnit 4 infrastructure to launch the JUnit Platform.

So what exactly are you proposing we change?

@sbrannen
Copy link
Member

@smoyer64 in light of #681, are you OK if I close this issue?

Or is there still something you would like to address beyond #681?

@sbrannen
Copy link
Member

Superseded by #681.

@smoyer64
Copy link
Contributor Author

Yes ... this should be closed as it was "clarified" by #681. I should have be more concise the first time but then again, I'd completely forgotten this issue by the time I wrote the other one!

@sbrannen
Copy link
Member

OK. Thanks for the feedback.

BTW, does the implementation of #681 meet your needs/expectations?

@smoyer64
Copy link
Contributor Author

Yes ... moving these annotations into another package eliminates the import of Vintage and JUnit 4. I think there are more uses for these annotations than just suites (we're really talking about limiting/hinting the discovery process) but I think people will find commonality between selecting tests for suites and selecting tests for various engines/runs.

Thanks for taking care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants