Skip to content

Modular Selenium Test Automation Framework built with Java, TestNG, Maven, and POM design pattern | Supports data-driven testing, cross-browser & parallel execution, and rich reporting with ExtentReports and screenshots.

Notifications You must be signed in to change notification settings

pramesh01/Selenium-Java-TestNG-POM-Framework-2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Automation Framework for Web Application

  • This repository contains an automation framework for web application testing.
  • The framework is built using Java 11, TestNG, and Maven, following the Page Object Model (POM) design pattern.
  • It is designed to be modular, scalable, and easily extendable, providing flexibility for local and parallel executions.

🛠️ Technologies & Tools Used

  • Java 11 → Programming language for automation scripts.
  • Maven → Dependency management & project build.
  • TestNG → Testing framework to execute tests and manage the STLC.
  • Page Object Model (POM) → Enhances test maintainability & reusability.
  • ExtentReports → Generates detailed and interactive HTML reports.
  • Log4j → Logging for info/debug/error messages.
  • Apache POI → Read/write Excel for data-driven testing.
  • Gson → JSON data serialization/deserialization for test data.
  • Faker Library → Generates dynamic/fake test data.

✨ Features

  • Data-driven testing (Excel, CSV, JSON).
  • Rich reporting with screenshots, logs, and HTML reports.
  • Cross Browser Testing (Chrome, Firefox, Edge, etc.).
  • Headless Mode for faster execution.
  • Grid Execution Support for parallel/distributed tests.
  • Parameterization via Maven CLI (e.g., browser, headless, grid).
  • ✅ Hooks via TestNG listeners for custom logging and reporting.
  • ✅ Reusable Page Object Model (POM) for maintainable test scripts.
  • ✅ Fake Data Generation using Faker library.

⚙️ Prerequisites

  • Java 11 or higher installed.
  • Maven installed & configured in system PATH.
  • IDE (IntelliJ IDEA, Eclipse, etc.) for development.
  • Browser drivers or Selenium Grid (if grid execution enabled).

📥 Setup Instructions

  1. Clone the repository
  1. Run the tests (default execution)
  • mvn clean test
  1. Run with parameters

    Run on specific browser:

    • mvn clean test -DbrowserName=chrome

    Run in headless mode:

    • mvn clean test -DbrowserName=chrome -DIsHeadless=true

    Run on Selenium Grid:

    • mvn clean test -DbrowserName=chrome -DIsGridEnabled=true

⚠️ Note: Ensure Selenium Grid is running before executing with -DIsGridEnabled=true.

📊 Reports & Logs

  • Extent Reports → Generated automatically inside /test-output folder after execution.
  • Screenshots → Captured for failed test cases.
  • Logs → Detailed execution logs via Log4j.

🔮 Future Enhancements

  1. The framework is under continuous improvement. Below are planned enhancements:

    • Integration of execution steps in Extent Reports
  2. Each test step (click, type, navigate, assert, etc.) will be logged dynamically inside the Extent HTML report.

    • Enhanced parallel execution using Selenium Grid
  3. Full parallel test execution across multiple nodes and browsers.

    • Support for more scenarios & test data sources
  4. Add new business workflows and additional data sources (like APIs or databases).

    • Jenkins CI/CD Integration
  5. Automate test execution via Jenkins pipeline with integrated report publishing.

  6. Dockerized Execution

    • Run Selenium Grid setup and test execution in Docker containers for isolated environments.

✅ Conclusion

  • This framework is designed to be highly flexible, scalable, and maintainable.
  • It seamlessly integrates with reporting, logging, and data-driven testing tools.
  • Parameterization enables execution across multiple browsers, environments, and Selenium Grid.
  • A strong foundation for building enterprise-grade web automation suites.

👨‍💻 Author

Pramesh Kumar

📌 About Me

Hi, my name is Pramesh Kumar. I am an Automation Tester with around 8 years of total experience in web testing and automation using the Java programming language. I have worked on multiple projects for various companies, focusing on building maintainable and scalable automation solutions.

About

Modular Selenium Test Automation Framework built with Java, TestNG, Maven, and POM design pattern | Supports data-driven testing, cross-browser & parallel execution, and rich reporting with ExtentReports and screenshots.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages