First time posting! I've tried looking through all the other posts regarding surefire issues without any avail, so any help would be greatly appreciated.
I am currently trying to deal with the "junit-platform-surefire-provider has been deprecated" warning in my project. Version 2.22.2 of surefire is being used, where all of the junit jupiter tests in our project are currently found.
WARNING: The junit-platform-surefire-provider has been deprecated and is scheduled to be removed in JUnit Platform 1.4. Please use the built-in support in Maven Surefire >= 2.22.0 instead. https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven
Test results with 55 tests found
The issue arises when I try to remove the junit-platform-surefire-provider and jupiter-engine dependencies from within the plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
</plugin>
This provider is going to be deprecated and I am trying to get rid of it. I followed the documentation at https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven in order to try and use the built in support in Maven Surefire. In addition to removing those two dependencies, I added the following two dependencies to my section on my POM file.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
Once I have done this, the build will complete, but it no longer finds any tests.
Test Results with ZERO tests found
Is there something that I'm missing?