使用Junit/Test NG在Selenium中以编程方式创建测试报告(不使用ANT) [英] Create test reports programmatically (not using ANT) in Selenium using Junit / Test NG
问题描述
我想创建测试报告(每个测试用例执行后生成的报告).我可以使用ANT生成JUnit测试报告.但是,我的要求是必须通过Java生成这些报告.
I want to create test reports (reports generated after the execution of each test case). I can generate JUnit test reports using ANT. But, my requirement is such that I would have to generate these reports through Java.
哪种方法是使用Java创建测试报告的最佳方法?
Which is the best way to create test reports using Java ?
不仅需要在JUnit中创建测试报告.可以在任何测试框架中创建它.与之相关的任何建议/建议都可能会有所帮助.因此,请您分享使用Java生成测试报告的经验.
The test reports need not only be created in JUnit. It can be created in any test framework. Any suggestions / advice related to it might prove helpful. So, request you to share you experience in generating test reports using Java.
推荐答案
TestNG报告将自动生成.标准文件夹在您的项目中是测试输出.请参阅第6.2.2章中的testNG文档,并遵循 http://testng.org/doc /documentation-main.html 如何自定义它们.
TestNG reports get generate automaticlly if you run a suite(xml). Standard folder is test-output in your project. Have a look at the testNG doc at chapter 6.2.2 and following http://testng.org/doc/documentation-main.html how to customize those.
这篇关于使用Junit/Test NG在Selenium中以编程方式创建测试报告(不使用ANT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!