Skip to content

sachindhule-qa/selenium-automation-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Selenium Automation Framework

Java Selenium TestNG Maven License

A production-grade Selenium WebDriver + Java + TestNG automation framework built using the Page Object Model (POM) design pattern. Supports cross-browser testing, parallel execution, data-driven tests, and automated HTML reporting.


📁 Project Structure

selenium-automation-framework/
├── src/
│   ├── main/java/com/qa/
│   │   ├── pages/              # Page Object Model classes
│   │   │   ├── LoginPage.java
│   │   │   └── ProductsPage.java
│   │   └── utils/              # Utility/Helper classes
│   │       ├── ConfigReader.java
│   │       ├── ExtentReportManager.java
│   │       └── WaitUtils.java
│   └── test/
│       ├── java/com/qa/
│       │   ├── base/
│       │   │   └── BaseTest.java       # WebDriver setup & teardown
│       │   └── tests/
│       │       ├── LoginTest.java      # 7 login test cases
│       │       └── ProductsTest.java   # 4 products test cases
│       └── resources/
│           ├── config.properties       # Browser, URL, timeouts config
│           └── testng.xml              # TestNG suite configuration
├── reports/                            # Generated HTML reports (auto-created)
├── pom.xml                             # Maven dependencies
└── README.md

🛠️ Tech Stack

Tool Version Purpose
Java 11 Programming language
Selenium WebDriver 4.18.1 Browser automation
TestNG 7.9.0 Test framework
Maven 3.9+ Build & dependency management
WebDriverManager 5.7.0 Auto browser driver management
ExtentReports 5.1.1 HTML test reporting
Log4j2 2.23.0 Logging
Apache POI 5.2.5 Excel data-driven testing

✅ Test Coverage

Module Test Cases Type
Login 7 Functional + Data-Driven
Products 4 Functional + Regression
Total 11

🚀 How to Run

Prerequisites

  • Java 11+
  • Maven 3.9+
  • Chrome / Firefox / Edge browser

Clone the repo

git clone https://github.com/sachindhule-qa/selenium-automation-framework.git
cd selenium-automation-framework

Run all tests

mvn clean test

Run on specific browser

mvn clean test -Dbrowser=firefox
mvn clean test -Dbrowser=edge

Run in headless mode

Update config.properties:

headless=true

📊 Test Reports

After execution, HTML report is auto-generated at:

reports/ExtentReport.html

Open it in any browser to view detailed results with pass/fail status, logs, and screenshots.


⚙️ Configuration

Edit src/test/resources/config.properties:

base.url=https://www.saucedemo.com
browser=chrome
headless=false
implicit.wait=10
explicit.wait=15

🎯 Design Patterns Used

  • Page Object Model (POM) — Separates UI locators from test logic
  • Fluent Interface — Method chaining for readable test steps
  • Data-Driven Testing — TestNG @DataProvider for multiple data sets
  • Singleton Pattern — Single ExtentReports instance across suite
  • ThreadLocal — Thread-safe parallel test execution

👨‍💻 Author

Sachin Dhule — QA Automation Engineer
📍 Pune, Maharashtra, India
🔗 LinkedIn | GitHub


📄 License

This project is licensed under the MIT License.

About

Web UI Automation using Selenium & Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages