eclipse-jdt / eclipse-jdt/eclipse.jdt.ui

Replace JUnit 5 support with JUnit 6?

Open
#2,530 20 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
59
Forks
127
Avg merge
23h 30m
Merged PRs (30d)
35

Description

Trigger is: https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/3367

I'm in the process of making the changes for adding JUnit 6 (mimicking the JUnit 5 addition) and I'm wondering what the value of supporting both JUnit 5 and JUnit 6 is. At least on its release, JUnit 6 doesn't seem to add much on top of JUnit 5... maybe the major release was done to allow breaking changes.

See 6.0 change log: https://docs.junit.org/6.0.0/release-notes/

See also the mentioned migration guide, which says JUnit 6 is more or less a drop-in replacement for JUnit 5: https://github.com/junit-team/junit-framework/wiki/Upgrading-to-JUnit-6.0

Deprecated-for-removal APIs were removed and as @laeubi mentioned in the aggregator ticket, Java 17 is a requirement. From the POV of writing tests, nothing else has changed on first glance.

Looking at the work done for https://bugs.eclipse.org/bugs/show_bug.cgi?id=521750, I wonder if we should replace JDT JUnit 5 support with JUnit 6 support? See in particular this commit: https://github.com/eclipse-jdt/eclipse.jdt.ui/commit/612eb75ba650454a6f4ea4d071eac4ed786c9354#diff-1997d161b906873674a52ebd99af505bd39a58b2406df24882cd05f1fac14458

I wonder, since it seems somewhat redundant to support both JUnit 5 and JUnit 6? I don't think there is a difference between a JUnit 5 test and a JUnit 6 test, other than the underlying libraries we use to run the test.

So, opinions?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the JUnit 6 release notes, migration guide, aggregator issue 3367, and the referenced JDT UI commit for how JUnit 5 support was added. The issue currently asks for opinions rather than naming a file or test; done would require a decided migration scope and an agreed implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.