https://github.com/rennanreis/web-automation-suite
End-to-end automation tests for Swag Labs using Playwright.
https://github.com/rennanreis/web-automation-suite
ci-cd devops-tools e2e-testing github-actions page-object-model playwright qa-automation software-quality test-automation typescript
Last synced: about 2 months ago
JSON representation
End-to-end automation tests for Swag Labs using Playwright.
- Host: GitHub
- URL: https://github.com/rennanreis/web-automation-suite
- Owner: rennanreis
- License: mit
- Created: 2025-05-17T01:39:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-30T21:13:01.000Z (about 1 year ago)
- Last Synced: 2025-05-31T04:39:41.454Z (about 1 year ago)
- Topics: ci-cd, devops-tools, e2e-testing, github-actions, page-object-model, playwright, qa-automation, software-quality, test-automation, typescript
- Language: TypeScript
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web Automation Suite



> β οΈ This project is part of a personal portfolio and is not open to external contributions (pull requests or issues) at this time.
An end-to-end test automation suite for the [Sauce Labs Demo Site](https://www.saucedemo.com/) using Playwright and TypeScript.
It demonstrates modern QA practices like Page Object Model, custom fixtures, reusable test flows, and future-proof structure.
---
## π Quick Start
```bash
# Clone the repo
git clone https://github.com/your-username/web-automation-suite
# Install dependencies
npm install
# Run all tests
npx playwright test
# Run a specific test
npx playwright test tests/cart.spec.ts
# Run in headed mode
npx playwright test --headed
# Launch test runner UI
npx playwright test --ui
```
---
## Repository Structure
```
βββ page-objects/ # Page Object Model definitions
βββ fixtures/ # Custom test fixtures (auth, data, setup)
βββ tests/ # Individual test files
βββ playwright.config.ts # Playwright configuration
βββ README.md # Project documentation
```
---
## β
Covered Test Scenarios
- **Login:** Valid, invalid and locked credentials
- **Search & Sorting:** Sorting by price and name (A-Z, Z-A, low-high, high-low)
- **Cart:** Adding and removing products
- **Checkout:** Successful checkout flow and validation of required fields
- **Confirmation:** Confirmation message + return navigation
---
## π§ͺ Fixtures & Reusability
This project uses Playwrightβs custom fixtures to:
- Reuse login flows (`loginAsStandardUser`)
- Set up products in cart (`addProductToCart`, `loginAndAddProductToCart`)
- Navigate directly to protected routes (`navigateToProducts`)
- Centralize test data (`testData` fixture with valid/invalid users and product names)
- Clean up state before/after tests (`resetState`)
β‘οΈ This drastically reduces boilerplate and improves test readability.
---
## π§ Project Highlights
- Page Object Model for clean test logic and maintenance
- Custom fixtures to handle setup, teardown, and user flows
- English comments and clear test scenarios
- Modular and scalable structure
- Commit history follows Conventional Commits for clarity
- Tailored for QA portfolios and real-world team practices
---
## π Roadmap & Status
- β
Page Object Model applied to all test suites
- β
Centralized and reusable fixtures implemented
- β
All major flows (positive and negative) tested
- β
Test comments standardized in English
- β
Project structure cleaned and documented
### π Suggested Future Improvements
- π§ Add CI pipeline with GitHub Actions for automated test runs
- π Generate and track test coverage reports
- π Implement automatic retry for flaky tests
- π§Ύ Standardize file and method naming conventions
- π Add better logging for debugging and traceability
- π Connect test structure and decisions directly with the final article
---
## π― About
This project was created as part of a self-study path to master QA automation with Playwright.
It simulates a real QA engineer workflow in a production team, with emphasis on code readability, maintainability, and CI readiness.
All scenarios are built on top of the **Sauce Labs Demo App**, a sandbox platform widely used in testing practices.
---
## π License
MIT β feel free to read and learn, but external PRs are currently not accepted.
---