Community
Participate
Working Groups
The "New JUnit Test Suite" wizard has options to create JUnit 3 and JUnit 4 suites. It can be updated to create JUnit Jupiter test suites, if applicable. I couldn't find a way to create a test suite for JUnit Jupiter that can be run with JUnit 5. @RunWith(JUnitPlatform.class) is used with a suite to run it with JUnit 4, and not with JUnit 5. @Sam, could you please provide some details here? I am not sure what new option would be useful in this wizard for JUnit 5.
AFAICS, test discovery is supposed to replace the need for user-written test suites: http://junit.org/junit5/docs/current/user-guide/#launcher-api The idea seems to be that each environment reinvents the wheel and provides a separate language to describe which tests should be included in a test run. For example in Gradle: http://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle That is a huge step backwards. JUnit 5 should provide a standard way for users to store a test discovery request in a common format. http://junit.org/junit5/docs/current/user-guide/#launcher-api-discovery looks like LauncherDiscoveryRequest is the holder for all the necessary information to compose the equivalent of a test suite, but I don't see a standard way how users should store such a request for later use by a launcher (like Eclipse's JUnit launch configurations). Sam, did I miss something, or do you have plans to specify a common way for users to provide a LauncherDiscoveryRequest? E.g. a static suite method like this: public static LauncherDiscoveryRequest suite() { LauncherDiscoveryRequestBuilder.request()... } The JUnit 5 wizard could then generate a suite class that selects all tests by default, and which users can adapt to their needs.
> @RunWith(JUnitPlatform.class) is used with a suite to run it with JUnit 4, and not with JUnit 5. That's correct. The only way to run a "suite" on the JUnit Platform is currently via the JUnit 4 Runner (i.e., JUnitPlatform.class) as you pointed out. > @Sam, could you please provide some details here? We in fact moved the suite API annotations to the JUnit Platform in milestone 4: https://github.com/junit-team/junit5/issues/681 And we have "plans" to implement suite support on the platform, but we have not yet gotten to it. See the following issue for details. https://github.com/junit-team/junit5/issues/744 Regards, Sam
Hi Markus, > Sam, did I miss something, or do you have plans to specify a common way for users to provide a LauncherDiscoveryRequest? E.g. a static suite method like this: Nope, you didn't miss anything. Our current plans (see previous link to issue #744) are to support the existing suite API annotations on some type of class (or interface) that is picked up automatically by the JUnit Platform itself (i.e., not by a particular TestEngine). We did in fact have such a static method in place at one point for the JUnitPlatform Runner, but we decided against that approach. If you'd like to provide the JUnit Team further input, please add your comments to issue #744. Cheers! Sam
Removing dependency to bug 488566 (see above comments and https://github.com/junit-team/junit5/issues/744).
*** Bug 539000 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.