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

Migrate from JUnit 4 to JUnit 5 #472

Closed
obfischer opened this issue Jul 18, 2021 · 6 comments · Fixed by #473
Closed

Migrate from JUnit 4 to JUnit 5 #472

obfischer opened this issue Jul 18, 2021 · 6 comments · Fixed by #473

Comments

@obfischer
Copy link
Contributor

Writing tests is the hardest part in maintaining long-living software projects. Therefore, we should have the best tools available. So, the versions plugin should use JUnit 5 instead of JUnit 4.

obfischer added a commit to obfischer/fork-of-versions-maven-plugin that referenced this issue Jul 18, 2021
@obfischer
Copy link
Contributor Author

Please don't close this issue after merging pull request #473. I would like to re-use this issue for some more pull requests.

obfischer added a commit to obfischer/fork-of-versions-maven-plugin that referenced this issue Jul 18, 2021
obfischer added a commit to obfischer/fork-of-versions-maven-plugin that referenced this issue Jul 19, 2021
Version 64 of the parent POM will provide the dependency information
for JUnit 5. Therefore the entry in the dependency management section
can be removed if version 64 will be released.
@bmarwell bmarwell changed the title Switch from JUnit 4 to JUnit 5 Migrate from JUnit 4 to JUnit 5 Jul 19, 2021
@bmarwell
Copy link
Contributor

Please don't close this issue after merging pull request #473. I would like to re-use this issue for some more pull requests.

-1 – You can create an issue for migrating specific unit tests, where this issue only migrates the testing engine. The benefits would be more in-detail documentation why a particular test was migrated.
Over at apache ppl say "don't change stuff if it is not broken". I can see good reasons for migrating unit tests, though. Just document a group of tests in their own issue (my opinion).

@obfischer
Copy link
Contributor Author

I see the point, but IMHO code must be touched and always improved, as if you don't do it, you will reach the point, there you simply think: I don't want to touch this old crap, let us kick it. I know there is something in the middle, but I would prefer to improve things is it adds value.

@bmarwell
Copy link
Contributor

If you see "old crap" it got past a code review when it shouldn't have.
You're welcome to refactor such code. But I don't think every junit4 test needs to be converted just now. The syntax is very similar.

@olamy
Copy link
Member

olamy commented Jul 23, 2021

It’s not closed because code is still using old junit api 😜

@bmarwell
Copy link
Contributor

#472 (comment)

But if you insist, we can use this one for also tracking unit test conversions...

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

Successfully merging a pull request may close this issue.

3 participants