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

Document compatibility with JUnit 4 TestRules #343

Closed
7 of 11 tasks
smoyer64 opened this issue Jun 21, 2016 · 20 comments
Closed
7 of 11 tasks

Document compatibility with JUnit 4 TestRules #343

smoyer64 opened this issue Jun 21, 2016 · 20 comments

Comments

@smoyer64
Copy link
Contributor

smoyer64 commented Jun 21, 2016

The following is an analysis of which JUnit 4 TestRule functionality is provided by JUnit 5. This should be documented in an addendum to the User Guide.

Related Issues

Related Blog Posts

@sbrannen sbrannen added this to the 5.0 M2 milestone Jun 21, 2016
@sbrannen
Copy link
Member

Great list, and... thanks for doing all of the research!

@sbrannen
Copy link
Member

This is related to #169.

@sbrannen
Copy link
Member

sbrannen commented Jun 24, 2016

@sbrannen sbrannen modified the milestones: 5.0 M2, 5.0 M3, 5.0 Backlog Jul 15, 2016
@sbrannen sbrannen modified the milestones: 5.0 M3, 5.0 Backlog Jul 25, 2016
@sbrannen
Copy link
Member

sbrannen commented Aug 8, 2016

FYI: timeouts are supported in JUnit Jupiter via the assertTimeout() and assertTimeoutPreemptively() methods in Assertions. See #438 and related commits for details.

@smoyer64
Copy link
Contributor Author

smoyer64 commented Aug 8, 2016

Nice! I'll update the description and mark it complete when M3 becomes current.

@marcphilipp marcphilipp modified the milestones: 5.0 M4, 5.0 M3 Nov 30, 2016
@marcphilipp
Copy link
Member

marcphilipp commented Dec 22, 2016

@smoyer64 Would you be interested to add a section that documents the migration strategy for rules to the User Guide?

There are already sections for "Migration Tips" and "Limited JUnit 4 Rule Support".

@smoyer64
Copy link
Contributor Author

@marcphilipp I've started this task and, after thinking through how I'd like it to be organized, wanted to present my thoughts before getting too far ahead.

It's my opinion that those using TestRule are intimately familiar with the javadocs at http://junit.org/junit4/javadoc/latest/org/junit/rules/TestRule.html (and for the javadocs and examples provided for each of the implementations). My intention is to leverage that knowledge to provide side-by-side (well ... top and bottom) examples of JUnit4 and JUnit5 for each of the rules in the description of this issue. Each rule would also get a sub-heading to make them easy to find using the Java class name of the rule.

I've created the jupiter and vintage equivalents for ExpectedException as an example. Note that these classes are not yet annotated for inclusion in the documentation but they do pass spotless checks and execute successfully during the platform tests. The examples can be found at https://github.com/selesy/junit5/tree/issues/343-document-testrule-compatibility/documentation/src/test/java/example/testrule.

Please comment/critique both my intended approach and the way I've named/structure the example classes.

@marcphilipp
Copy link
Member

I think that's a very good approach. Please proceed! 🙂

@smoyer64
Copy link
Contributor Author

Full steam ahead ... I think I'll open a PR that's linked to this issue and my fork so that it's easier for the team to review my work. I'll mark it WIP so that it's clear that it shouldn't be merged yet.

@sbrannen
Copy link
Member

@smoyer64, is this still in progress?

@marcphilipp
Copy link
Member

@smoyer64 I've unassigned you and put this issue "up-for-grabs" for someone else to take over.

@stale
Copy link

stale bot commented May 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the status: stale label May 13, 2021
@stale
Copy link

stale bot commented Jun 3, 2021

This issue has been automatically closed due to inactivity. If you have a good use case for this feature, please feel free to reopen the issue.

@stale stale bot closed this as completed Jun 3, 2021
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