Maven没有在命令提示符下显示哪些测试失败

Sco*_*ott 10 testing windows-xp maven

当我从命令提示符运行mvn测试时,它不会显示在构建结束时哪些测试失败.不应该在测试中列出失败的测试错误吗?我正在使用windows xp :(我已经在命令提示符和console2中尝试过了.

结果:

Tests in error:

Tests run: 402, Failures: 0, Errors: 1, Skipped: 2

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to C:\code\btlims\java\chippingmanager\chipping-manager-client\target\surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 27 seconds
[INFO] Finished at: Tue Mar 29 09:19:58 CDT 2011
[INFO] Final Memory: 24M/43M
[INFO] ------------------------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)

Dre*_*wCo 5

我使用Maven 3.0.3和maven-surefire-plugin 2.8版遇到了这个问题.在pom.xml的surefire插件部分中,确保将printSummary选项设置为true.

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.8</version>
            <configuration>
                <printSummary>true</printSummary>
            </configuration>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

设置此选项后,您应该在命令行输出中看到完整的测试结果列表(包括失败).根据Surefire文档,当此选项设置为false时,仍应列出失败的测试用例,但在我的设置中似乎不是这种情况.