HeadSpin paves the way for achieving improved user experience and enjoy the benefits of:
- 90% reduction in number of production issues
- 30% faster development cycles
- 68% fewer hours spent on QA for new releases
As a software developer or tester, you are responsible for keeping track of your project launches, viewing and analyzing your test automation performance, comparing each execution category, tracking exceptions (if any), creating discussion topics, and searching entities from a myriad of options.
Extent Reports is an open-source library used for creating visually attractive reports during test automation. It produces HTML-based documents in graphs, pie charts, screenshots, custom logs, and test summaries in Java and .Net. The generated report can be shared with stakeholders using mails with several different functionalities. Due to its versatility and bundle of features, it’s one of the most used reporting libraries for Selenium tests.
When the automation test scripts are run, testers are required to generate a test execution report.
The primary purpose of Extent Reports is to highlight the test case reports in a readable and interactive format that showcases real-time analytics as well. Hence, it is beneficial for the software developers and testers while executing the test cases of a project to display the attributes of the test report.
Extent reports are widely used in software organizations. The reporting they offer is mostly used by Selenium web drivers. Extent Reports are one of the best ways to generate customizable HTML reports with a delightful user interface in the Selenium web driver. It is the top choice for automation testers as it is an open-source library and can be easily configured with Selenium.
Check out: Selenium Automation Tips
Installing Extent Reports is not a tedious process. It requires the following prerequisites to be installed in the system, followed by the steps for its installation.
After the installation is complete, here are the steps to display the test reports using Extent Reports:
In the initial step of reporting, we need to first specify the file storage location. Then, create the HtmlReporter in that path and attach it with the Extent Report using the code:
Build the test cases and steps report using the ‘createTest’ and ‘createNode’ methods:
The test case execution status is updated using the code:
Assigning the author name is useful if individuals are working on the same project using the code:
The categories of the report are assigned using the code:
We need to log a screenshot in case of a failed test case to document the defects in the functionality with the code:
We need to write everything in the file after the report is created, and it could be viewed using the code:
The HTML reports can be customized using normal coding and XML config file as follows:
The test report title, encoding, protocol, theme, and other attributes can be configured with the code:
You can customize the report using the xml file too using this code:
<documentTitle>MST Automation Report</documentTitle>
<img src=”../sample.png” style=”position:absolute;center:55px;”/>
<message> Automation Demo </message>
This xml file is loaded into the html Extent Report using the code mentioned below:
Extent Reports can be integrated using the Appium script in the following way: Before executing the Appium script, make sure that you have downloaded all the jar files in your system required for your project. Steps for Appium Script Execution:
In this article, the usefulness of Extent Reports was mentioned along with how they make the life of software developers and testers easier by displaying test reports to project managers and stakeholders in a beautifully crafted manner. The installation of Extent Reports was also explained, along with how they are customized and displayed in different formats. Lastly, the integration code for Extent reports with the Appium Java Scripts was also demonstrated.
The Extent Report has many features to create a detailed test report, which could be incorporated into data-driven, hybrid, pom, and BDD frameworks. Thus, taking your project to a higher level. Install them today and realize their full potential.
Ans: ExtentReports class, ExtentTest class, and ExtentHtmlReporter class.
Ans: Allure Report is a flexible multi-language test report tool containing a detailed report on the conducted test in a web report form. It also allows users participating in the development process to extract the maximum of useful information from the everyday execution of tests.
Ans: Maven is an open-source build tool to build, publish, and deploy several projects simultaneously for better project management. The tool enables developers to develop and document the lifecycle framework.
Ans: Reporter Class is an inbuilt class in TestNG and is available under the org.testng package. Reporter Class provides test styles to log dispatches that will be included in the HTML reports generated by TestNG. This class is one of the simplest ways of generating log information, where the logs in the reports can be either stoner-generated or system-generated reports.