This project is an automation framework built using Java, Selenium, TestNG, Maven, TDD (Test-Driven Development), and the Page Object Model (POM) design pattern. It is designed to automate the testing of web applications, ensuring a maintainable, scalable, and efficient testing process.
The project follows a standard Maven structure:
src
|-- main
| |-- java
| |-- com.saucelab
| |-- annotations
| |-- base
| |-- contants
| |-- helperUtils
| |-- listeners
| |-- pages
| |-- provider
| |-- utils
| |-- resources
| |-- testData
|-- test
| |-- java
| |-- com.saucelab
| |-- pageTests
- base: Contains the BaseTest, SetUpDriver, and DriverManager for browser management.
- pages: Contains the Page Object Model classes for different web pages.
- utils: Contains utility classes such as ScreenshotUtil and ScrollUtil.
- pageTests: Contains the TestNG test classes.
- constants: Contains constants and copy texts
- provider: Test data reader from json and csv files
- annotations: Contains customs annotations
- listeners: Contains listeners for custom annotations and for saving failed tests screenshot to report
- Java 11 or higher
- Maven
- TestNG 7.10.2 or higher
- Selenium 4.21.0 or higher
-
To run all pageTests using firefox browser:
mvn clean test
-
To run by specifying browser:
mvn clean test -Dbrowser=firefox
-
To run pageTests with a specific test suite with required browser:
mvn clean test -DsuiteXmlFile=suites/smoke_testng.xml -Dbrowser=firefox
The project uses Allure for test reporting. After running the pageTests, you can generate the Allure reports using the following command:
-
Generate Allure report:
mvn allure:report
-
Open Allure report:
mvn allure:serve
or
allure serve
-
To save report in a single file with report name
allure generate -c --single-file allure-results --report-name Allure Report - Firefox
![]() |
![]() |
![]() |
![]() |