IDE Support
IntelliJ IDEA
IntelliJ IDEA supports running tests on the JUnit Platform since version 2016.2. For more
information, please consult this IntelliJ IDEA resource. Note,
however, that it is recommended to use IDEA 2017.3 or newer since more recent versions of
IDEA download the following JARs automatically based on the API version used in the
project: junit-platform-launcher, junit-jupiter-engine, and junit-vintage-engine.
In order to use a different JUnit version (e.g., 6.1.0-SNAPSHOT), you may need to
include the corresponding versions of the junit-platform-launcher,
junit-jupiter-engine, and junit-vintage-engine JARs in the classpath.
testImplementation(platform("org.junit:junit-bom:6.1.0-SNAPSHOT"))
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
<!-- ... -->
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>6.1.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Eclipse
Eclipse IDE offers support for the JUnit Platform since the Eclipse Oxygen.1a (4.7.1a) release.
For more information on using JUnit Platform in Eclipse consult the official Eclipse support for JUnit 5 section of the Eclipse Project Oxygen.1a (4.7.1a) - New and Noteworthy documentation.
NetBeans
NetBeans offers support for JUnit Jupiter and the JUnit Platform since the Apache NetBeans 10.0 release.
For more information consult the JUnit 5 section of the Apache NetBeans 10.0 release notes.
Visual Studio Code
Visual Studio Code supports JUnit Jupiter and the JUnit Platform via the Java Test Runner extension which is installed by default as part of the Java Extension Pack.
For more information consult the Testing section of the Java in Visual Studio Code documentation.
Other IDEs
If you are using an editor or IDE other than one of those listed in the previous sections, and it doesn’t support running tests on the JUnit Platform, you can use the Console Launcher to run them from the command line.