Bug 539000 - Junit 5 Test Suites: No test found with test runner 'Junit 5'
Summary: Junit 5 Test Suites: No test found with test runner 'Junit 5'
Status: CLOSED DUPLICATE of bug 511183
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-12 16:31 EDT by Jay Catelli CLA
Modified: 2019-06-10 04:26 EDT (History)
3 users (show)

See Also:


Attachments
Test class (970 bytes, application/octet-stream)
2019-06-10 02:43 EDT, Francesco Guidieri CLA
no flags Details
Suite (240 bytes, application/octet-stream)
2019-06-10 02:44 EDT, Francesco Guidieri CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Catelli CLA 2018-09-12 16:31:43 EDT
I have an eclipse project with multiple packages and multiple Junit 5 Unit Test that are spread in lower level packages.   All the simple Junit 5 Unit Test classes execute with out issue.   When I try to create a Junit 5 Test Suite at the main package level I get the following error message No test found with test runner 'Junit 5',

The structure of the Test Suite is pretty straight forward.   The code in the Test Suite is below:

@RunWith(JUnitPlatform.class)
@SuiteDisplayName("Test Suite")
@SelectPackages("com")
public class AllTests
{

}

Per the Junit 5 User Guide it looks like this code should work and the declaration of the top level package should cause all the lower level Junit test to execute.   I have also tried to build the Test Suite by using the @SelectClass method but that has resulted in the same error message from eclipse.
Comment 1 Olivier Prouvost CLA 2018-10-28 19:23:18 EDT
I have the same issue. Is there a workaround by setting values in the launch test file ?
Comment 2 Noopur Gupta CLA 2019-01-11 05:21:35 EST
JUnit support is implemented in JDT UI.
Comment 3 Noopur Gupta CLA 2019-01-11 05:33:34 EST
This looks like a duplicate of bug 512772 comment #17. Please check with the latest 4.11 build if your issue is resolved. If not, please attach a sample project to reproduce the problem.

For test suites in JUnit 5, see also bug 511183.
Comment 4 Francesco Guidieri CLA 2019-06-10 02:43:21 EDT
Created attachment 278871 [details]
Test class
Comment 5 Francesco Guidieri CLA 2019-06-10 02:44:03 EDT
Created attachment 278872 [details]
Suite
Comment 6 Francesco Guidieri CLA 2019-06-10 02:52:52 EDT
I experienced the same issue.

No problem if I run the attached class (with parameterized tests) with Junit5.

The Suite cannot be run with Junit 5, because of 'No test found with test runner 'Junit 5'.

If I try to run it with Junit4, as said in https://bugs.eclipse.org/bugs/show_bug.cgi?id=511183, Junit view shows executed tests as unrooted.

Please see attached files (test and suite classes).
Comment 7 Noopur Gupta CLA 2019-06-10 04:26:02 EDT
(In reply to Francesco Guidieri from comment #6)
So it's the issue with JUnit test suites and JUnit 5 which will be handled in bug 511183.

*** This bug has been marked as a duplicate of bug 511183 ***