question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigate JUnit 5

See original GitHub issue

JUnit 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 and expectedException 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:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:33 (29 by maintainers)

github_iconTop GitHub Comments

9reactions
philwebbcommented, May 31, 2019

Spring Boot 2.2 will switch to JUnit 5 by default. This issue has now been superseded by the following issues:

4reactions
philwebbcommented, Nov 1, 2017

@sdeleuze Oh wow. That was a total typo. I meant to say we should not switch 😕

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found