Using Selenium, IAnnotationTransformer, TestNG, and POM created a Data-driven framework. Also generates Extent Report after Test Execution
- Language: Java
- Used POM to organise the classes and packages
- Data driven tests from Excel using TestNG DataProvider.
- Used TestNG framework to keep track of test cases getting passed, failed, and skipped.
- Used Maven to manage the dependencies and as build execution tool
- Drivers used: Selenium-Java WebDriver -
3.141.59
, Chrome driver, Gecko driver
- It will generate the Extent Report with the screenshots when test case fails. Easily customizable according to project need from TestRunDetails.properties.
- TestData from the excel sheet(/resources/testdata.xlsx) is fetched with the help of dataprovider and storing it in HashMap for easier processing. -- In the RunManager sheet --> Choose the test cases you want to run by pass Yes under RunFlag column -- In the TestData sheet ---> Choose the test data you want to pass to the testcase from excel sheet.
- Annotation transformer helps in setting the annotations for the test cases at run time including the ability to re-run the failed scripts
- The project highlights each element clicked on Web Page with Red border.
- JDK 1.8+ (make sure Java class path is set)
- Maven (make sure .m2 class path is set)
- Eclipse
- Eclipse Plugins for
- Maven
- TestNG
- Browser driver (make sure you have your desired browser drivers in lib folder under project directory).
Currently this repository has below drivers:
- Gecko driver version - 0.27.0, compatible with Mozilla Firefox version ≥79.
- Chrome driver version - 84.0.4147.30, compatible with Chrome version 84
- Install dependencies:
mvn install
- To run the test on Chrome Browser:
mvn test -PSanityTest -DbrowserName.USER="chrome"
- To run the test on FireFox Browser:
mvn test -PSanityTest -DbrowserName.USER="firefox"
Generates HTML Extent report at project directory path: /ExtentReports/TestReport.html