I have been trying to figure out how to get JUnit 5 tests working
correctly in Netbeans 15.
with maven-surefire-plugin version 2.19.1 and lower it works but with
versions starting 2.20 the Test Result window in Netbeans just says 'No
tests executed' even though in the Output window I can see that they
were executed.
Running tests from command line - mvn surefire:test - works fine, tests
are executed.
Setting trimStackTrace to false didn't help.
Netbeans version 15
Java tried with 8, 11, 17 and 18
Maven tried with 3.8.6 and 3.8.4
Junit 5 tried with almost all versions from 5.6.0 to 5.9.0
OS Linux Manjaro
pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.atrament</groupId>
<artifactId>TestJunit5</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<exec.mainClass>org.atrament.testjunit5.TestJunit5</exec.mainClass>
</properties>
</project>
Can anyone help please?
Thanks
Vlad