Investigate JUnit 5
See original GitHub issueJUnit 5 looks like it might be a very awkward upgrade for both our users and Spring Boot itself. We’ll need to come up with a plan going forward for how people should upgrade.
Of particular concern:
- You can’t just run JUnit 4 tests with JUnit 5 😢
- There are new
@Test
annotations andexpectedException
has been dropped - There is no
@Rule
annotation (this will break a lot of our tests and we’ll need to offer alternatives to the rules we offer)
We might be able to offer JUnit 5 alongside JUnit 4 for a while (possibly a long while) so that people can use both.
I imagine probably going to frustrate a lot of users given that mostly their own test code has very little direct contact with the JUnit API. Mostly people use @Test
, @Before
/@After
, perhaps a few @Rule
annotations and some Assert
calls.
Related issue https://github.com/junit-team/junit5/issues/169
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:33 (29 by maintainers)
Top Results From Across the Web
Investigating JUnit 5 asserts - Alexander on Test
It is vital that when a test does fail, it gives an informative error message to help identify the problem. Ideally, your well...
Read more >Search: JUnit 5 in 10 minutes. - Sudo null
JUnit 5 has been available for a few weeks now so in this post I will investigate setting it up and migrating from...
Read more >What's new in JUnit 5? - Scott Logic Blog
JUnit 5 has been available for a few weeks now so in this post I will investigate setting it up and migrating from...
Read more >Using JUnit 5 in IntelliJ IDEA - The JetBrains Blog
These can be used via Gradle, so you could run the tests in IntelliJ IDEA using the Gradle runner. I'm also investigating if...
Read more >Determine the Execution Time of JUnit Tests - Baeldung
We'll implement our examples in JUnit 5. However, the equivalent tools and techniques ... We'll examine each one in the next subsections.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Spring Boot 2.2 will switch to JUnit 5 by default. This issue has now been superseded by the following issues:
@sdeleuze Oh wow. That was a total typo. I meant to say we should not switch 😕