Skip to content

Commit adf250b

Browse files
committed
Add N&N entry for JDT JUnit 6 support
Fixes: #436
1 parent 15c96b2 commit adf250b

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed
31.7 KB
Loading
72.3 KB
Loading
25.8 KB
Loading
47.4 KB
Loading

news/4.38/jdt.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,44 @@ A special thanks to everyone who [contributed to JDT](acknowledgements.md#java-d
77
## Java™ XX Support
88
-->
99

10-
<!--
10+
1111
---
1212
## JUnit
13-
-->
13+
14+
### Eclipse support for JUnit 6.0.1
15+
<!-- https://github.com/eclipse-jdt/eclipse.jdt/issues/147 -->
16+
<details>
17+
<summary>Contributors</summary>
18+
19+
- [Christoph Laeubrich](https://github.com/laeubi)
20+
- [Ed Merks](https://github.com/merks)
21+
- [Hannes Wellmann](https://github.com/HannesWell)
22+
- [Simeon Andreev](https://github.com/trancexpress)
23+
</details>
24+
25+
#### Create a new JUnit Jupiter test via **New JUnit Test Case** wizard:
26+
27+
![New JUnit Jupiter Test Case Wizard](images/JUnit6NewTestCaseWizard.png)
28+
29+
#### Add JUnit 6 library to the build path:
30+
31+
New JUnit Test Case wizard offers to add it while creating a new JUnit Jupiter test:
32+
33+
![Add JUnit 6 Container for New Test Case](images/JUnit6AddClasspathContainer.png)
34+
35+
Quick Fix **(Ctrl+1)** proposal on `@Test`, `@TestFactory`, `@ParameterizedTest` and `@RepeatedTest` annotations:
36+
37+
![Quick Fix Proposal JUnit 6 Container](images/JUnit6QuickFixProposal.png)
38+
39+
Add JUnit library in Java Build Path dialog:
40+
41+
![Build Properties Page JUnit 6 Container](images/JUnit6BuildPropertiesContainer.png)
42+
43+
See also:
44+
45+
[JUnit 6 Changelog](https://docs.junit.org/6.0.0/release-notes/)
46+
47+
[JUnit 5 New & Noteworthy in Eclipse 4.8](https://eclipse.dev/eclipse/news/4.8/jdt.html#JUnit)
1448

1549
<!--
1650
---

news/4.38/pde.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,20 @@ A special thanks to everyone who [contributed to PDE](acknowledgements.md#plug-i
1414
---
1515
## PDE Compiler
1616
-->
17+
18+
---
19+
## JUnit Plug-in Test Launch
20+
21+
### JUnit 5 and JUnit 6 conflicts in Eclipse 4.38+
22+
23+
Eclipse 4.38 supports JUnit 6 in parallel to JUnit 5. To achieve this, the platform contains both JUnit 5 and JUnit 6.
24+
This can result in launch configuration and runtime problems in tests,
25+
when a plug-in does not correctly bound the version of JUnit Jupiter (JUnit 5 and JUnit 6) bundles.
26+
27+
The most common problem is running a JUnit 5 plug-in test launch with a `MANIFEST.MF` dependency to `junit-jupiter-api`.
28+
This will result in no tests executed. To resolve the problem, either specify a version bound `junit-jupiter-api;bundle-version="[5.0.0,6.0.0)"`
29+
or update the test launch to use JUnit 6. Other unbound dependencies to JUnit Jupiter bundles can likewise result in no executed tests.
30+
31+
A more difficult to analyze problem is when a transitive dependency of the plug-in has an unbound dependency to JUnit Jupiter.
32+
The Plug-in Explorer view or the [Plug-in Dependencies](https://github.com/iloveeclipse/plugindependencies) view
33+
can be used to analyze unexpected dependencies to JUnit 6.

0 commit comments

Comments
 (0)