Skip to content

SahilSR81/End2End-QA-Automation-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ E2E QA Simulation - Ecommerce

An Industry-Grade Automation Testing Framework 🎯

Java Maven Selenium TestNG Allure CI/CD with Maven E2E QA Automation Tests


πŸ“– Table of Contents


🎯 Overview

This is a comprehensive end-to-end QA automation framework for testing ecommerce applications. It's built with cutting-edge technologies and best practices to ensure robust, reliable, and maintainable test automation.

Test Target: DemoWebShop - A fully functional ecommerce platform

πŸ’‘ Perfect for: QA Engineers, Test Automation Developers, and anyone who wants to learn professional test automation!


✨ Features

Feature Status Details
πŸ—οΈ Page Object Model βœ… Clean, maintainable architecture
πŸ“Š Data-Driven Testing βœ… CSV-based test data management
🌐 Cross-Browser Support βœ… Chrome, Firefox, Edge
🎭 End-to-End Journeys βœ… Complete user workflows
🎲 Fake Data Generation βœ… Dynamic test data with JavaFaker
πŸ“Έ Screenshot Capture βœ… Auto-capture on failures
πŸ“ Advanced Logging βœ… Log4j2 with detailed traces
πŸ“Š Beautiful Reports βœ… Allure with attachments & trends
βš™οΈ CI/CD Ready βœ… GitHub Actions integration
πŸ”€ Parallel Execution βœ… Multi-threaded test runs
πŸ§ͺ TestNG Framework βœ… Enterprise-grade testing

πŸ› οΈ Tech Stack

Component Version Purpose
Java 25+ Programming Language
Maven 3.9+ Build & Dependency Management
Selenium 4.25+ Browser Automation
TestNG 7.10+ Test Framework
WebDriverManager 5.6+ Driver Management
Log4j2 2.24+ Logging System
JavaFaker 1.0.2 Test Data Generation
Allure 2.29+ Reporting & Visualization

πŸ“ Project Structure

πŸ“¦ e2e-qa-simulation-ecommerce/
β”‚
β”œβ”€β”€ πŸ“‚ src/
β”‚   β”œβ”€β”€ πŸ“‚ main/java/com/ecommerce/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ config/          β†’ βš™οΈ Configuration Management
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/           β†’ 🏠 Page Object Models
β”‚   β”‚   └── πŸ“‚ utils/           β†’ πŸ”§ Utility Classes & Helpers
β”‚   β”‚
β”‚   └── πŸ“‚ test/java/com/ecommerce/
β”‚       β”œβ”€β”€ πŸ“‚ base/            β†’ 🎯 Base Test Class
β”‚       β”œβ”€β”€ πŸ“‚ tests/           β†’ βœ… Test Cases
β”‚       β”œβ”€β”€ πŸ“‚ listeners/       β†’ πŸ‘‚ TestNG Event Listeners
β”‚       └── πŸ“‚ resources/       β†’ πŸ“„ Test Data & Config Files
β”‚
β”œβ”€β”€ πŸ“‚ .github/workflows/       β†’ πŸ”„ CI/CD Pipeline (GitHub Actions)
β”œβ”€β”€ πŸ“‚ allure-results/          β†’ πŸ“Š Test Results & Reports
β”œβ”€β”€ πŸ“‚ target/                  β†’ 🎁 Build Output
β”‚
β”œβ”€β”€ πŸ“„ pom.xml                  β†’ πŸ“¦ Maven Configuration
β”œβ”€β”€ πŸ“„ README.md                β†’ πŸ“– This File!
└── πŸ“„ .gitignore               β†’ 🚫 Git Ignore Rules

⚑ Quick Start (5 Minutes!)

🎬 Step 1: Clone the Repository

git clone https://github.com/yourusername/e2e-qa-simulation-ecommerce.git
cd e2e-qa-simulation-ecommerce

2️⃣ Step 2: Check Prerequisites

# Check Java version (should be 25+)
java -version

# Check Maven version (should be 3.9+)
mvn -version

# If not installed, download from:
# Java: https://www.oracle.com/java/technologies/downloads/
# Maven: https://maven.apache.org/download.cgi

3️⃣ Step 3: Install Dependencies

# Maven will automatically download all dependencies
mvn clean install

4️⃣ Step 4: Run Tests

# Run all tests
mvn clean test

# Tests will run automatically and generate reports!

5️⃣ Step 5: View Beautiful Reports

# Generate and open Allure report in browser
mvn allure:serve

βœ… That's it! Your tests are now running! πŸŽ‰


πŸƒ Running Tests

πŸ“‹ Run All Tests

mvn clean test

🌐 Run Tests for Specific Browser

# Chrome (recommended)
mvn clean test -Dbrowser=chrome

# Firefox
mvn clean test -Dbrowser=firefox

# Edge
mvn clean test -Dbrowser=edge

🎯 Run Specific Test Class

mvn clean test -Dtest=LoginTest

πŸ“Š Generate Allure Report

# Generate Allure report and open in browser
mvn allure:serve

# Or just generate without opening
mvn allure:report

πŸš€ Run with Headless Mode (Faster)

mvn clean test -Dheadless=true

πŸ“ˆ Run Tests in Parallel

mvn clean test -Dparallel=true -DthreadCount=3

πŸ“Š CI/CD Pipeline

🎯 How CI/CD Works in This Project

Our GitHub Actions pipeline automatically:

  1. βœ… Checks out your code
  2. βœ… Sets up Java environment
  3. βœ… Installs Chrome browser
  4. βœ… Runs all automated tests
  5. βœ… Generates Allure reports
  6. βœ… Uploads results as artifacts
  7. βœ… Notifies you of results

πŸ“… When Does CI/CD Run?

βœ… On every Push to main or develop branch
βœ… On every Pull Request
βœ… Daily at 2 AM (automatic regression)

πŸš€ How to Use CI/CD

For Local Development:

# Your code runs locally first
mvn clean test

# Push to GitHub
git add .
git commit -m "Add new test case"
git push origin feature-branch

GitHub Actions Runs Automatically:

  1. Go to your GitHub repository
  2. Click on "Actions" tab
  3. See your workflow running in real-time! 🎬
  4. View detailed logs and results
  5. Download test reports as artifacts

Pull Request Checks:

  1. Create a Pull Request
  2. CI/CD runs automatically
  3. βœ… If all tests pass β†’ You can merge
  4. ❌ If tests fail β†’ Fix issues and push again

πŸ“Š View Test Reports

# During CI/CD run:
1. Go to GitHub Actions tab
2. Click on your workflow run
3. Scroll down to "Artifacts"
4. Download allure-report-chrome.zip
5. Extract and open index.html in browser

πŸ”§ CI/CD Configuration File

Located at: .github/workflows/maven-test.yml

name: E2E QA Automation Tests

on:
  push:
    branches: [ main, develop ]
  pull_request:
    branches: [ main, develop ]
  schedule:
    - cron: '0 2 * * *'  # Daily at 2 AM

jobs:
  test:
    runs-on: ubuntu-latest
    # More configuration...

πŸ“ˆ Future Improvements

🎯 Planned Enhancements

  • 🌐 API Testing - REST API testing with REST Assured
  • πŸ” Security Testing - OWASP security checks
  • πŸ“Š Performance Testing - JMeter integration
  • ☁️ Cloud Execution - BrowserStack/Sauce Labs integration
  • πŸ“ˆ Advanced Analytics - Trending reports & dashboards
  • πŸ”Œ Slack Integration - Test results to Slack notifications
  • πŸ“§ Email Reports - Automated report distribution
  • πŸ”„ Test Retry Logic - Smart retry mechanism for flaky tests
  • πŸš€ Performance Optimization - Faster test execution

πŸ“ Test Coverage

βœ… Current Test Scenarios

  • πŸ” User Registration & Login
  • πŸ›οΈ Product Browsing & Search
  • πŸ›’ Add to Cart & Wishlist
  • πŸ’³ Checkout Process
  • 🧾 Order Confirmation
  • πŸ‘€ User Profile Management

πŸ“Š Coverage Stats

  • Total Test Cases: 64
  • Page Objects: 20+
  • Utility Functions: 30+

🀝 Contributing

I ❀️ contributions! Here's how to contribute:

1️⃣ Fork the Repository

Click "Fork" button on GitHub

2️⃣ Clone Your Fork

git clone https://github.com/YOUR_USERNAME/e2e-qa-automation-framework.git
cd e2e-qa-automation-framework

3️⃣ Create Feature Branch

git checkout -b feature/your-feature-name

4️⃣ Make Changes & Commit

git add .
git commit -m "Add: Brief description of changes"

5️⃣ Push to Your Fork

git push origin feature/your-feature-name

6️⃣ Create Pull Request

- Go to original repository on GitHub
- Click "New Pull Request"
- Select your fork and branch
- Add description and submit! πŸŽ‰

πŸ“‹ Contribution Guidelines

  • Follow POM architecture pattern
  • Add tests for new features
  • Update documentation
  • Use meaningful commit messages
  • Ensure all tests pass locally before pushing

πŸ’¬ Getting Help


Made with ❀️ by QA Automation Enthusiast

"Quality is not an act, it is a habit." – Aristotle

⭐ If you found this helpful, give us a star! ⭐

About

Enterprise-Ready Test Automation Framework built with Selenium, Java and TestNG featuring POM Architecture, Parallel Execution, Data-Driven Testing, Allure Reporting and CI/CD Pipelines.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages