简体   繁体   English

如何使用Java在Selenium WebDriver中生成报告

[英]How can I generate a report in Selenium WebDriver using Java

I am using java and Selenium WebDriver. 我正在使用Java和Selenium WebDriver。

How can I generate report in Selenium WebDriver using java? 如何使用Java在Selenium WebDriver中生成报告? I don't want JUnit or TestNG report. 我不想要JUnit或TestNG报告。

Does anyone can help? 有人可以帮忙吗?

You can set up ANT and ANT reports gives you output report more detailed than the regular TestNG or Junit report. 您可以设置ANT,并且ANT报告可以为您提供比常规TestNG或Junit报告更详细的输出报告。 You can customize your reports as well. 您也可以自定义报告。

Maven "surefire plugin" , Gradle, Ant, TestNG, SauceLabs , etc. They all have reporting capabilities. Maven的“ surefire插件”,Gradle,Ant,TestNG,SauceLabs等。它们都具有报告功能。 You just need to write the code that generates a JUnit compatable report and which ever build tool you use (listed above) should be able to parse the result into an HTML file. 您只需要编写代码即可生成与JUnit兼容的报告,并且您使用的任何构建工具(上面列出)都应该能够将结果解析为HTML文件。

More advanced: If you want to generate your own report from the JUnit XML result or your own custom XML result, you can use a XSLT transformation to render HTML files from your XML results. 更高级:如果要从JUnit XML结果或自己的自定义XML结果生成报告,则可以使用XSLT转换来从XML结果呈现HTML文件。 Also, if you use Jenkins for CI then it can also render a report for you. 另外,如果您使用Jenkins for CI,那么它也可以为您呈现报告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Junit在Selenium Webdriver中生成测试用例报告 - How to generate the Test case report in selenium Webdriver using Junit 在Selenium Webdriver中生成报告 - generate the report in selenium webdriver 如何使用 Selenium WebDriver 和 Java 关闭特定的 window? - How can I close a specific window using Selenium WebDriver with Java? 如何使用带有 Java 的 Selenium WebDriver 单击按钮? - How can I click on a button using Selenium WebDriver with Java? 如何在 selenium webdriver (java) 中生成报告? - How to generate reports in selenium webdriver (java)? 我可以在Selenium Webdriver中使用Java发送电子邮件并添加附件吗? - Can I send email and add an attachment using Java in Selenium Webdriver? 为什么我不能在Java中使用Selenium Webdriver截屏? - Why I can't take a screenshot using selenium webdriver in java? 我如何使用 DOM 定位器使用 selenium webdriver java 来定位 Web 元素 - How can i locate a web element by using DOM locator using selenium webdriver java 如何验证特定文本下的文本 <DIV> 使用Selenium WebDriver(java)和Chrome浏览器标记? - How can I verify presence of text under a specific <DIV> tag using Selenium WebDriver (java) and Chrome? 如何使用带有Java的Selenium WebDriver将一个类的值传递给另一个类? - How can I pass one class value into another class using Selenium WebDriver with Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM