A modular, maintainable, and scalable Selenium Test Automation Framework built with Java, TestNG, Maven, Page Object Model (POM), and ExtentReports.
This framework is designed to provide organized test execution, reusability, professional reporting, and cross-browser support while keeping the codebase clean and easy to maintain.
- ✅ TestNG Integration → test execution, grouping, and lifecycle management
- ✅ Maven Dependency Management → auto-manages Selenium, TestNG, WebDriverManager, ExtentReports
- ✅ Page Object Model (POM) → separation of locators, actions, and tests
- ✅ Reusable Utilities → element fetcher, retry analyzer, listeners, constants
- ✅ Cross-Browser Support → Chrome, Firefox, Edge (via WebDriverManager)
- ✅ Extent Reports → detailed HTML reports with pass/fail/skip logs and screenshots
- ✅ Retry & Screenshot Handling → flaky test handling and automatic evidence capture
. ├── base │ └── BaseTest.java # Core test setup (browser, reporting, lifecycle) │ ├── pageObjects │ ├── HomePageElements.java │ └── LoginPageElements.java │ ├── pageEvents │ ├── HomePageEvents.java │ └── LoginPageEvents.java │ ├── qa.tests │ └── Testcase1.java # Sample test using framework │ ├── utils │ ├── Constants.java │ ├── ElementFetch.java │ ├── RetryAnalyzer.java │ └── SuiteListener.java │ ├── pom.xml # Maven dependencies └── testng.xml # TestNG configuration
- Run tests via
testng.xml
- Defines test cases, browsers, and listeners
BaseTest
initializes- Browser setup, app launch, waits, and reporting configuration
- Tests run
- Page Events trigger actions (clicks, inputs) using Page Objects (locators)
- After-method handling
- Pass/Fail/Skip logged in Extent Report
- Failures → Screenshot captured + test retried (via RetryAnalyzer & SuiteListener)
- Report generated
- Interactive Extent Report with results & screenshots
- 📌 Separation of Concerns → Elements (pageObjects), Actions (pageEvents), Tests (qa.tests)
- 📌 Maintainability → Update locators in one place
- 📌 Reusability → Utilities for common operations
- 📌 Scalability → Add tests/pages easily
- 📌 Professional Reporting → ExtentReports + failure screenshots
- Java 11+
- Maven 3+
- IDE (IntelliJ / Eclipse recommended)
- Clone the repository:
git clone https://github.com/your-username/selenium-framework.git
Import the project as a Maven Project in your IDE.
Run tests using Maven:
mvn clean test or specify the suite:
mvn test -DsuiteXmlFile=testng.xml 🔹 Reports After execution, reports will be available under:
/test-output/ExtentReports 📊 Sample Report The framework generates interactive HTML Extent Reports that include:
Test case execution details
Pass/Fail/Skip logs
Screenshots for failed steps
🛠️ Tech Stack Java
Selenium WebDriver
TestNG
Maven
ExtentReports
WebDriverManager
✅ In One Line A professional Selenium Test Automation Framework with TestNG, Maven, POM, ExtentReports, retries, and screenshots — built for maintainability, scalability, and reliability.