How redskull5143/frameworkwebautomation works
Project Type and Purpose
• This is a test-automation framework (not a customer-facing full-stack app).
• Purpose: automate end-to-end tests for an e-commerce site using Java + Selenium WebDriver, organized via the Page Object Model (POM), executed with TestNG and Gradle, reporting via Allure, and integrated into CI via GitHub Actions.
File Structure
• Top-level directories:
• src/main/java/com/omshinde/capstone
– actions (WebActions, ButtonAction, TextBox, SearchContent)
– components (reusable UI fragments like HeaderComponent)
– models (data holders e.g. User)
– modals (pop-up abstractions: CartModal, FilterByPriceModal, SearchModal)
– pages (POM classes for each page: BasePage, HomePage, CartPage, RegistrationPage, etc.)
– Categories.java (test data enum)
• src/test/java/com/omshinde/capstone
– test suites organized by feature (testAuthentications, testCart, testOrders, testProducts)
– util (BaseTest, DriverFactory)
• Resources:
• webdriver-config.properties (driver settings)
• Log4j2.xml + logs directory
• CI/CD:
• .github/workflows/gradle.yml
• Build system:
• Gradle wrapper, build.gradle, settings.gradle
README for Additional Insights
• Confirms tech stack: Java / Selenium / TestNG / Gradle / Git / Allure
• Lists test coverage areas (Search, Profile, Contact, Registration, Login, Cart)
• Explains how to build (gradle clean build) and run (gradle test)
Main Components
a. Test Runner & Orchestration
• Gradle → invokes TestNG
• GitHub Actions workflow
b. Core Framework Modules
• DriverFactory (instantiates WebDriver per webdriver-config.properties)
• BaseTest (setup/teardown, reading config, logging)
c. Page Object Layer (POM)
• Pages (HomePage, CartPage, LoginPage, etc.)
• Components & Modals (HeaderComponent, CartModal, etc.)
d. Low-Level Action Utilities
• WebActions, ButtonAction, TextBox, SearchContent
e. Test Suites
• Authentication tests, Cart tests, Order tests, Product tests
f. External Systems & Tools
• Web Browser (Chrome/Firefox)
• AUT (SUT) Web Server at web-playground.ultralesson.com
• Allure Reporting Service
• GitHub Actions / CI
Relationships & Data Flows
• Gradle → TestNG Runner → BaseTest
• BaseTest uses DriverFactory → WebDriver → Browser → HTTP requests/responses to AUT
• Test methods call Page Objects → which delegate to Action Utilities → manipulate Browser DOM
• Page Objects may embed Components/Modals
• Tests verify outcomes (assertions) → results piped to Allure
• CI pipeline triggers Gradle, collects Allure results
Architectural Patterns & Design Principles
• Page Object Model for UI abstraction
• Single Responsibility: actions vs. page vs. modal vs. component vs. test
• Factory Pattern for WebDriver instantiation
• Layered architecture:
Test Suite → BaseTest/DriverFactory → POM Layer → Action Utilities → WebDriver
Relevant Technologies & Frameworks
• Java (core language)
• Selenium WebDriver (browser automation)
• TestNG (test orchestration)
• Gradle (build + dependency management)
• Allure (test reporting)
• Log4j2 (logging)
• GitHub Actions (CI/CD)
Detailed Steps for the Engineer
1. Sketch top-level: CI/CD → Build & Test Orchestration → Reporting
3. Config retrieval path (webdriver-config.properties → DriverFactory)
4. Runtime flow: Test → BaseTest → POM → WebActions → WebDriver → Browser → AUT
5. Log generation path (Log4j2 → logs/app.log)