Community
Participate
Working Groups
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.
I have the same issue. Is there a workaround by setting values in the launch test file ?
JUnit support is implemented in JDT UI.
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.
Created attachment 278871 [details] Test class
Created attachment 278872 [details] Suite
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).
(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 ***