我如何为Junit结果生成HTML报告? [英] How can I generate an HTML report for Junit results?
问题描述
我相信任务只是将XML报告转换为HTML,因此使用任何XSLT处理器生成类似的报告都是可行的。
或者,您可以切换到使用TestNG( http://testng.org/doc /index.html ),它与JUnit非常相似,但有一个默认的HTML报告以及其他一些很酷的功能。
Is there a way to (easily) generate a HTML report that contains the tests results ? I am currently using JUnit in addition to Selenium for testing web apps UI.
PS: Given the project structure I am not supposed to use Ant :(
If you could use Ant then you would just use the JUnitReport task as detailed here: http://ant.apache.org/manual/Tasks/junitreport.html, but you mentioned in your question that you're not supposed to use Ant. I believe that task merely transforms the XML report into HTML so it would be feasible to use any XSLT processor to generate a similar report.
Alternatively, you could switch to using TestNG ( http://testng.org/doc/index.html ) which is very similar to JUnit but has a default HTML report as well as several other cool features.
这篇关于我如何为Junit结果生成HTML报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!