Test automation framework using Selenium WebDriver with Cucumber,Java, TestNG and Maven, with Page Object Model Design Pattern
-
This project demonstrates Page Object Model Pattern and how it can be used in Selenium to automate any application. Maven is used as a test framework. Also used a Factory Design Pattern to implement driver selection according to the browser requirement.
-
For passing test data, and for separating test types Regression, Smoke Cucumber is utilized.
-
For reporting cucumber reports are used and reports can be found in folder "target/cucumber-reports/advanced-reports.html/cucumber-html-reports/feature-overview.html". Also, there are different styles of report inside "target" folder
-
For failed cases, screenshots can be found in folder "screenShots" folder.
-
Prerequisite: JDK 8 or above, and Maven 3.6 or above
-
To run the all the tests use the following command:
mvn clean install
Tests are divided and in Smoke and Regression, and tagged with @Regression and @Smoke in feature files.
If a user wants to run only Smoke tests the command for that is :
mvn test -Dcucumber.options="--tags @Smoke"
If a user wants to run only Regression tests the command for that is :
mvn test -Dcucumber.options="--tags @Regression"
-
A user can also directly run "src/test/java/runner/TestRunner.java" file to execute tests
-
Logs can be found as application.log inside the project
-
The repo will be updated continuously.