首页 > 技术文章 > 解决:target\surefire-reports for the individual test results

ios9 2021-05-25 22:34 原文

问题:arget\surefire-reports for the individual test results

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project SpringBootDataRedis: There are test failures.

Please refer to E:\softCode\Idea_softCode\workSpaces_idea202003\SpringBootDataRedis\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.


image


解决方法:

这是因为测试代码时遇到错误,它会停止编译。只需要在pom.xml的<project>里添加以下配置,使得测试出错不影响项目的编译。

image

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

推荐阅读