In order to run our selenium webdriver automation scripts on chrome/firefox browsers, we have to download the binary/.exe files like Chromedriver.exe and geckodriver.exe.
As we know all know that ExtentReport is an HTML reporting library (open source) which can be integrated with Selenium WebDriver.
In this article, we will teach you how to develop advanced extent reports / integrate Extent Reports with your existing test automation framework.
We assume you have a working knowledge on Selenium,TestNG and Maven.
Let us start now !!!!
Importance of Reporting in a Test Automation Framework :-
Until today, we have used below code snippet in our automation scripts to take the screenshot using selenium. But most of them started complaining about FileUtils which was working fine earlier, but is not working after upgrading selenium webdriver with latest version.
Extent Reports are the most popular reporting used with Selenium. As we all know, TestNG generates html reports by default but they are not more readable and interactive, we have to put lots of efforts to make it attractive. TestNG has provided an ability to implement 'IReporter' an interface to customize testng report by users.
Knowledge which helps to understand the importance of types of locators in Selenium – it’s the first and main step in the way of using such product “at maximum speeds”. And knowledge on their correct usage – it’s the main skill of working with this utility, as the rest knowledge in the process of interface with Selenium is just trivial selecting of necessary libraries and extensions and also using some backdoor ways.
Earlier the way how we used to construct a FirefoxDriver is by passing desired capabilities object like
FirefoxDriver(Capabilities desiredCapabilities) which is now Deprecated. But from Selenium v3.6.0 it is recommended to construct a FirefoxDriver with FirefoxOptions, like below:
ChromeOptions class extends MutableCapabilities. We can use ChromeOptions class to manage options specific to ChromeDriver.
MutableCapabilities was introduced for the first time with Selenium v3.6.0 (Java Client). All the Option classes now extends MutableCapbilities. Refer the JavaDoc link for org.openqa.selenium.MutableCapabilities.
Until today, to perform data-driven testing, we have used libraries like Apache POI, JExcel etc to read/write Excel files. To work with these libraries, we have to create spreadsheet, save in a repository and we need to write much amount of code to access the spreadsheet and test all the data dependent scenarios.
Selenium Grid is used to speed up the execution by using multiple machines (multiple browsers with different versions, and browsers running on different operating systems) and run tests in parallel. And also to reduce the time spent for running the test suite after developers check-in their code.