小编Jos*_*nio的帖子

Maven没有检查JUnit测试

我主要使用本教程配置了Maven和Junit:http: //maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html

我有一个测试类,当我执行"mvn test"时,这个测试类被Maven捕获,但是Maven没有检查它(结果应该是FAIL).

C:\Users\User\git\example\example>mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building passport 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ passport -
--
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ passport ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pa
ssport ---
[WARNING] Using platform …
Run Code Online (Sandbox Code Playgroud)

eclipse junit java-ee maven maven-surefire-plugin

1
推荐指数
1
解决办法
1027
查看次数

标签 统计

eclipse ×1

java-ee ×1

junit ×1

maven ×1

maven-surefire-plugin ×1