Skip to content

raxit00701/selenium-java-framework-with-dynamic-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“– Overview

A robust, industry-ready automation testing framework built on Selenium + Java + TestNG, designed to validate critical flows of the JPetStore demo website .This framework is data-driven, supports cross-browser parallel execution, integrates dynamic Allure reporting with videos, screenshots, logs, and provides a scalable Page Object Factory design for maintainable test automation.

Key highlights:

30+ smoke/regression test cases

Data-driven approach using CSV files

Dynamic Allure reporting (graphs, logs, browser console, env details)

Automatic video clips & screenshots on failures

Cross-browser parallel execution (Chrome, Firefox, Edge)

Scalable Page Object Factory pattern

CI/CD integration with Jenkins

✨ Features

βœ… 30+ test cases across login, signup, checkout, owner management, etc.

βœ… CSV-based test data (src/test/resources/data/*.csv)

βœ… Allure reporting with:

Real-time execution graphs

Console logs

Environment info

Screenshots & videos on failures

βœ… Cross-browser execution (Chrome, Firefox)

βœ… Page Object Factory β†’ clean, reusable, maintainable

βœ… Jenkins CI/CD pipeline ready

πŸ— Project Structure Pets_store_selenium_java/ │── .allure/ # Allure system files │── allure-report/ # Generated Allure HTML report │── allure-results/ # Raw Allure result files │── screenshots/ # Captured screenshots │── videos/ # Test failure video recordings │── src/ β”‚ β”œβ”€β”€ main/java/ β”‚ β”‚ β”œβ”€β”€ factory/ # DriverFactory, Browser options β”‚ β”‚ └── utils/ # CSV utilities, helpers β”‚ β”‚ β”‚ └── test/java/ β”‚ β”œβ”€β”€ base/ # BaseTest setup β”‚ β”œβ”€β”€ pages/ # Page Object Factory classes β”‚ β”œβ”€β”€ reports/ # TestNG listeners, Allure integrations β”‚ └── tests/ # Test classes (30+ cases) β”‚ │── src/test/resources/ β”‚ └── data/ # CSV test data β”‚ β”œβ”€β”€ animal.csv β”‚ β”œβ”€β”€ find_owner.csv β”‚ β”œβ”€β”€ login.csv β”‚ β”œβ”€β”€ owner.csv β”‚ β”œβ”€β”€ payment.csv β”‚ β”œβ”€β”€ signin.csv β”‚ └── signup.csv β”‚ │── testng.xml # TestNG suite configuration │── pom.xml # Maven build + dependencies │── README.md # Project documentation │── target/ # Build output

βš™οΈ Tech Stack

Language: Java 17

Framework: TestNG 7.x

Automation: Selenium 4.x

Build Tool: Maven 3.8+

Reports: Allure 2.x

Data: OpenCSV (CSV-driven tests)

CI/CD: Jenkins (with Allure plugin)

πŸš€ Getting Started πŸ”Ή Prerequisites

Java 17+

Maven 3.8+

Allure Commandline

Chrome + Firefox browsers

Verify setup:

java -version mvn -version allure --version

πŸ”Ή Clone Repository git clone https://github.com/raxit00701/JPetStore-Selenium-TestNG-Framework.git cd JPetStore-Selenium-TestNG-Framework

πŸ”Ή Run Tests

Default (Chrome):

mvn clean test

Firefox:

mvn clean test -Dbrowser=firefox

Parallel via TestNG:

mvn clean test -DsuiteXmlFile=testng.xml

πŸ”Ή Allure Reports

Generate & open report locally:

allure serve target/allure-results

Generate HTML report:

allure generate target/allure-results -o target/allure-report --clean

πŸ“Š Example Data-Driven Test

CSV file (login.csv):

username,password j2ee,j2ee testuser1,pass123 testuser2,pass456

Java DataProvider:

@DataProvider(name = "loginData") public Object[][] getLoginData() { return CsvUtils.readCsv("src/test/resources/data/login.csv"); }

πŸ”„ Jenkins CI/CD

Configured with Allure Jenkins Plugin

Build step:

mvn clean test

Post-build:

Publish Allure report β†’ target/allure-results

Badge in README auto-updates:

πŸ§‘β€πŸ’» Author

πŸ‘€ Raxit Sharma

πŸ’Ό QA Automation Engineer Enthusiast

🌐 GitHub Profile

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages