我的pom.xml
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.1</version>
<scope>test</scope>
</dependency>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
但是当我执行 mvn clean test
命令时
-------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
请注意,IntelliJ确实识别这个测试
![enter image description here](https://istack.dev59.com/19yOx.webp)
test
文件夹并选择Run All Tests
时,它会显示No tests found
)。为什么Maven没有运行我的单元测试,如何解决?
org.junit.jupiter.api.Test
? - amseager