Search code examples
intellij-ideajunitjunit5

intellij test fails: Please refer to ..target\surefire-reports for the individual test results


I want to test my java intellij project using maven and get error which is not related to my code. To be more specific Intellij editor complains so:

"Please refer to C:\Users\USER\IdeaProjects\testing\target\surefire-reports for the individual test results."

I added needed dependencies for unit testing im pom.xm file:

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

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.1.0</version>
        </plugin>
    </plugins>
</build>

Solution

  • I have solved it. The problem was that the maven version had to be updated from 3.6.0 to 3.9.x for JDK 55.0-61.0