A professional QA Automation Framework built with Java, Selenium WebDriver, TestNG, and Maven - following the Page Object Model (POM) design pattern for clean, maintainable, and scalable test automation.
- Page Object Model architecture for clean separation of concerns
- ThreadLocal WebDriver for safe parallel test execution
- BDD support with Cucumber/Gherkin syntax
- API testing with REST Assured
- Zero-config driver management via WebDriverManager
- Centralized test suite configuration with TestNG XML
- Reusable base classes to minimize code duplication
- GitHub Actions CI/CD — automated builds, test runs and nightly cross-browser checks
| Tool | Version | Purpose |
|---|---|---|
| Java | 17 | Core language |
| Selenium WebDriver | 4.18 | Browser automation |
| TestNG | 7.9 | Test execution & reporting |
| Maven | 3.9 | Build & dependency management |
| Cucumber/BDD | latest | Behavior-driven testing |
| REST Assured | latest | API test automation |
| WebDriverManager | latest | Auto driver setup |
| GitHub Actions | - | CI/CD pipeline |
selenium-pom-framework/
├── .github/
│ └── workflows/
│ ├── ci.yml # Build & test on every push/PR
│ ├── pr-validation.yml # Compile check on pull requests
│ └── nightly.yml # Nightly cross-browser scheduled run
├── src/
│ └── test/
│ ├── java/
│ │ ├── pages/ # Page Object Model classes
│ │ ├── tests/ # Test classes
│ │ └── utils/ # Base classes & Driver Manager
│ └── resources/
│ └── testng.xml # TestNG suite configuration
└── pom.xml # Maven dependencies
This project uses GitHub Actions for continuous integration and delivery.
| Workflow | Trigger | What it does |
|---|---|---|
ci.yml |
Push to main/develop, PRs |
Builds the project and runs all tests in headless Chrome |
pr-validation.yml |
Every Pull Request | Validates compilation and posts a comment on failure |
nightly.yml |
Daily at midnight UTC | Runs the full suite on both Chrome and Firefox in parallel |
Tests automatically run in headless mode when executed in a CI environment. The DriverManager detects the CI environment variable and applies the correct browser flags.
- Java 17+
- Maven 3.9+
- Chrome / Firefox browser installed
git clone https://github.com/FaraazSuffla/selenium-pom-framework.git
cd selenium-pom-framework
mvn install# Run full test suite
mvn clean test
# Run specific test class
mvn clean test -Dtest=LoginTest
# Run with specific browser
mvn clean test -Dbrowser=firefox
# Run in headless mode (same as CI)
mvn clean test -Dheadless=trueEach page of the application has a dedicated class that encapsulates its elements and actions - keeping test logic completely separate from UI interactions.
Uses ThreadLocal<WebDriver> to ensure each test thread gets its own browser instance, enabling safe and reliable parallel test execution.
A shared base class handles WebDriver initialization and teardown, reducing boilerplate across all test classes.
Tests are run against SauceDemo - a purpose-built e-commerce practice app covering login, product browsing, cart, and checkout flows.
- GitHub: @FaraazSuffla
- LinkedIn: in/faraazsuffla