ExtentHTMLReporter

The ExtentHTMLReporter API is a reporting tool that takes all the TestNG results data from a Selenium test run and processes it into a concise HTML report. That report can be published in Jenkins using the HTML Publisher Plugin, which was just covered. And it doesn't need the Selenium WebDriver to use it. The API will work with other TestNG results data from API, unit, or headless browser tests.

Since the framework outlined in this book is based on Java and TestNG technologies, it is fairly easy to integrate the report into the framework. Here are the requirements:

  1. Build the ExtentTestNGIReporterListener class; there is a sample class on the website for users to get up and running
  2. Customize the report to pull in TestNG results along with screenshot data from exceptions
  3. Modify the report's look-and-feel using JavaScript and CSS attributes
  4. Include the listener class in the Selenium suite files to generate the report

After using the sample code to generate the report, users can modify the CSS attributes in the extent-config.xml file or by using available report features, customize the theme from white to black, and use the logging features to log status, data, screenshots, stacktrace, log file entries, and so on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.217.134