Maven 显示在不带-X选项的测试类中运行的所有测试

Maven 显示在不带-X选项的测试类中运行的所有测试,maven,junit,surefire,Maven,Junit,Surefire,是否有任何方法可以配置mvn命令,以显示在测试摘要(在Results:部分)中运行了哪些测试(测试类中的测试方法),而不使用过度详细的-X选项 ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.myproject.MyTestClass Tests run: 2, Failure

是否有任何方法可以配置
mvn
命令,以显示在测试摘要(在
Results:
部分)中运行了哪些测试(测试类中的测试方法),而不使用过度详细的-X选项

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.myproject.MyTestClass
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.033 sec <<< FAILURE!

Results :
  #I would like to show the passed test here
Failed tests: 
  testTwo(com.myproject.MyTestClass)

Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
-------------------------------------------------------
T T S T S
-------------------------------------------------------
运行com.myproject.MyTestClass

测试运行:2,失败:1,错误:0,跳过:0,经过的时间:0.033秒No,不容易<运行测试的code>maven surefire插件
,只能生成您已经看到的失败测试的摘要和列表()

如果您真的想将其添加到构建中,可以在测试运行后处理留在
target/surefire报告中的XML文件,可以使用Groovy脚本或类似的工具