Skip to content

CarlosArman/PlaywrightJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SauceDemo Playwright Java JUnit Automation


Java Playwright Java JUnit 5 Maven Allure

Architecture POM E2E Status

🌐 Language / Idioma

πŸ‡¬πŸ‡§ English Β  | Β  πŸ‡ͺπŸ‡Έ EspaΓ±ol

Enterprise-ready E2E automation framework built with Playwright for Java, JUnit 5, and Maven, designed to showcase scalable QA automation design, maintainability, clean architecture, and reporting readiness.


🎯 Why This Project Matters

This repository is positioned as a QA Automation portfolio project that demonstrates more than automated checks. It shows how to structure a maintainable Java-based framework with:

  • Playwright for Java for modern browser automation
  • JUnit 5 for structured test execution
  • Maven for dependency and build management
  • Page Object Model (POM) for clean abstraction and reuse
  • Allure reporting for execution evidence
  • Logging and reusable utilities for maintainability
  • Tag / group-based execution strategy
  • Scalable architecture ready to evolve toward CI/CD

This project demonstrates Java QA automation best practices, including maintainable architecture, reporting, reusable components, and structured documentation.


πŸš€ Project Overview

This repository contains an end-to-end automation framework for SauceDemo using:

  • Playwright for Java
  • JUnit 5
  • Maven
  • Allure Report
  • Page Object Model
  • Log4j / SLF4J logging
  • DataFaker-based test data support

πŸ”— Application under test: https://www.saucedemo.com/
πŸ”— Repository: https://github.com/CarlosArman/PlaywrightJava


✨ What This Framework Demonstrates

Functional Coverage

  • βœ… Login validation
  • βœ… Shopping validation
  • βœ… Item detail coverage
  • βœ… Footer coverage
  • βœ… Burger menu coverage
  • βœ… Cart coverage
  • βœ… Checkout information coverage

Engineering Practices

  • βœ… Java + JUnit 5 based automation design
  • βœ… Page Object Model architecture
  • βœ… Reusable utilities and shared flows
  • βœ… Group-based execution support
  • βœ… Allure-ready reporting
  • βœ… Structured logging configuration
  • βœ… Clean separation between tests, pages, models, utilities, and data

QA Portfolio Value

  • βœ… Clean automation architecture in the Java ecosystem
  • βœ… Practical evidence generation strategy
  • βœ… Clear documentation and project organization
  • βœ… Easy onboarding for reviewers and recruiters
  • βœ… Strong comparison point against a TypeScript + Cucumber implementation

🧰 Tech Stack

  • Language: Java 17+
  • Automation Framework: Playwright for Java
  • Testing Framework: JUnit 5
  • Build Tool: Maven
  • Design Pattern: Page Object Model (POM)
  • Reporting: Allure Results / Allure Report
  • Logging: Log4j / SLF4J
  • Test Data: DataFaker
  • Application Under Test: SauceDemo

πŸ— Project Structure

PlaywrightJava
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/                    
β”‚   β”‚   └── resources/               # Main resources and global configuration
β”‚   └── test/
β”‚       β”œβ”€β”€ java/
β”‚       β”‚   β”œβ”€β”€ annotations/         # Custom annotations and execution groups (e.g. Smoke, Regression)
β”‚       β”‚   β”œβ”€β”€ automation/          # Test classes and automated scenario coverage
β”‚       β”‚   β”œβ”€β”€ data/                # Test data builders and custom data providers
β”‚       β”‚   β”œβ”€β”€ models/              # Domain and test data models
β”‚       β”‚   β”œβ”€β”€ pages/               # Page Object Model and reusable UI components
β”‚       β”‚   └── utilities/           # Base classes, common flows, providers, logging, and utilities
β”‚       └── resources/               # Test resources and execution/report configuration
β”œβ”€β”€ docs/                            # Additional documentation
β”œβ”€β”€ CHANGELOG.md                     # Project changelog
β”œβ”€β”€ CONTRIBUTING.md                  # Contribution guide
β”œβ”€β”€ pom.xml                          # Maven build, dependencies, and plugin configuration
β”œβ”€β”€ README.md                        # Main documentation in English
└── README.es.md                     # Main documentation in Spanish

βš™ Quick Start

1. Clone the repository

git clone https://github.com/CarlosArman/PlaywrightJava.git
cd PlaywrightJava

2. Install dependencies

mvn clean install

3. Install Playwright browsers

mvn exec:java -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"

4. Run tests

mvn clean test

β–Ά Main Commands

The main README should expose only the most important commands. For the full reference, see docs/COMMANDS.md and * *docs/COMMANDS.es.md**.

mvn clean install
mvn exec:java -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install"
mvn clean test
mvn clean test -Dgroups="login"
allure serve allure-results

πŸ“Š Reporting and Evidence

This framework includes execution evidence through:

  • JUnit 5 execution results
  • Allure results generation
  • Allure HTML visualization
  • Logging configuration through Log4j / SLF4J
  • Structured page abstractions and shared flows for debugging clarity

To open the report after execution:

allure serve allure-results

🧠 Architecture Snapshot

The framework is organized around separation of concerns:

  • automation/ β†’ test classes
  • pages/ β†’ UI interaction abstraction
  • utilities/ β†’ base classes, shared flows, logging, and providers
  • models/ β†’ domain models
  • data/ β†’ reusable/custom data support
  • annotations/ β†’ grouping or categorization strategy
  • resources/ β†’ configuration artifacts such as log4j2.xml and allure.properties

For full architecture details, see:


πŸ”— Related Project

If you would like to compare this framework with a related automation project built in the TypeScript ecosystem, check out:

A related implementation built with:

  • TypeScript
  • Playwright
  • Cucumber (BDD)
  • Allure Report
  • Page Object Model (POM)

This comparison demonstrates the ability to work across both Java + JUnit 5 and TypeScript + Cucumber stacks while preserving strong QA automation architecture principles.


πŸ“š Documentation Index

Core docs

Repository docs


πŸ›£ Roadmap

  • Expand scenario coverage
  • Add stronger group strategy documentation
  • Strengthen CI/CD integration
  • Add richer evidence examples in the repository
  • Improve metrics / observability conventions

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

Carlos R.
QA Test Automation Engineer
πŸ”— GitHub: https://github.com/CarlosArman


⭐ Final Note

This project is intentionally documented and structured to reflect not only functional automation capability, but also * engineering maturity in Java-based QA automation design*.

About

Playwright for Java + JUnit 5 + Maven E2E automation framework for SauceDemo with POM and Allure reporting.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages