A comprehensive, robust automation testing suite developed using Playwright with JavaScript. This project serves as a showcase of testing strategies, demonstrating UI interactions, API automation, Page Object Model (POM) pattern, and Data-Driven Testing (DDT) using diverse formats (JSON, CSV, Excel).
This repository demonstrates the automation of a wide array of web elements, testing configurations, and patterns:
PlaywrightAutomation/
│
├── pages/ # Page Object Model Class Definitions
│ ├── LoginPage.js # Locators and helper methods for Login Page
│ ├── HomePage.js # Locators and helper methods for Home Page
│ └── CartPage.js # Locators and helper methods for Cart Page
│
├── tests/ # Playwright Specification/Test Files
│ ├── apitests.spec.js # API automation test cases
│ ├── pomtest.spec.js # POM-based UI workflow test case
│ ├── paramtest*.spec.js # Data-Driven Parameterization spec files
│ ├── uploadfiles/ # Directory containing test upload files
│ └── commands.txt # Playwright and Cucumber command cheat-sheet
│
├── testdata/ # Test Datasets (JSON, CSV, Excel files)
│ ├── data.json
│ ├── data.csv
│ └── data.xlsx
│
├── playwright.config.js # Global Playwright configuration file
├── package.json # Node.js project manifests and dev dependencies
└── .env # Environment variables (API keys, etc.)
- Node.js: Ensure Node.js (version 18 or above recommended) is installed on your machine.
- Clone the Repository:
git clone <repository-url> cd PlaywrightAutomation
- Install Project Dependencies:
npm install
- Install Playwright Browsers:
npx playwright install
Allure Playwright reporter is pre-configured in the project dependencies.
- Generate Allure Report:
npx allure generate allure-results --clean
- Open Allure Report:
npx allure open allure-report