Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ doesn't autocomplete JUnit 5 Jupiter classes

I have Maven imports for JUnit 5 in an IntelliJ install, and I have invalidated the cache and restarted.

IntelliJ will refuse to autocomplete (CTRL-SPACE) any class nor any static method belonging to classes in the org.junit.jupiter.api. package, unless the class' fully qualified name is spelled out. Even when writing the package for which the class belongs, will not suggest the classes of that package.

attempts

IntelliJ version is 2017.2.1. Jupiter version is 5.0.0-RC2, platform is 1.0.0-RC2.

I am unsure how to move on from here. How come this package is the only one that seems to refuse basic completion?

<properties>
    <junit.jupiter.version>5.0.0-RC2</junit.jupiter.version>
    <junit.platform.version>1.0.0-RC2</junit.platform.version>
</properties>

<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-api</artifactId>
    <version>${junit.jupiter.version}</version>
    <scope>test</scope>
</dependency>

<!-- Only required to run tests in an IDE that bundles an older version -->
<dependency>
    <groupId>org.junit.platform</groupId>
    <artifactId>junit-platform-launcher</artifactId>
    <version>${junit.platform.version}</version>
    <scope>test</scope>
</dependency>
<!-- Only required to run tests in an IDE that bundles an older version -->
<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter-engine</artifactId>
    <version>${junit.jupiter.version}</version>
</dependency>
like image 314
Hay Avatar asked Aug 31 '25 05:08

Hay


1 Answers

Please check those classes are not in exclude list in File | Settings | Editor | General | Auto Import

like image 87
Peter Gromov Avatar answered Sep 02 '25 22:09

Peter Gromov