java - Maven 有没有像样的 HTML Junit 报告插件?

标签 java maven-2 ant surefire

我发现 surefire-report 插件非常不适合我的工作方式。我一直在清理项目,我不想每次想在浏览器中查看测试报告时都花费 5 分钟来重建整个站点。

如果我输入 mvn surefire-report:report-only,生成的报告太难看,几乎不可读。

我正在寻找类似 ant 的 JUnitReport 任务。是否已经有一个可用的?

最佳答案

这就是我的工作:

# Run tests and generate .xml reports
mvn test

# Convert .xml reports into .html report, but without the CSS or images
mvn surefire-report:report-only

# Put the CSS and images where they need to be without the rest of the
# time-consuming stuff
mvn site -DgenerateReports=false

转到 target/site/surefire-report.html 以获取报告。

测试运行后,其余两个对我来说大约在 3.5 秒内运行。

希望对您有所帮助。享受吧!

关于java - Maven 有没有像样的 HTML Junit 报告插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2846493/

相关文章:

java - 如果文件存在,如何增加文件名编号

java - 如何解决 Can Injected only one of <ITestContext, XmlTest> into a BeforeTest annotated setBrowser 错误

java.lang.VerifyError : Inconsistent stackmap frames at branch target 421 错误

java - 如何在每次部署我的 JSP 应用程序时自动执行一些代码

java - 缺少 tools.jar 文件

java - WriteBytes 在我的文件中写入字符串

java - 从多次出现的较大字符串中获取特定的小字符串

maven-2 - 如何为多模块项目的一个模块执行不同的目标?

maven-2 - 如何在 Maven 中使用或滥用工件分类器?

android - 无法获取 Android 版 Emma Coverage