Check Maven Surefire Plugin Configuration
Even though you have JUnit 5 dependencies, the maven-surefire-plugin might need explicit configuration to recognize JUnit 5 tests. Add the following plugin configuration to your pom.xml (within the <build><plugins> section):