Markdown
This repository serves as a personal workspace for demonstrating and practicing End-to-End (E2E) testing using the Playwright framework, primarily leveraging TypeScript.
This project showcases a complete setup for automated web application testing with Playwright. It includes the necessary configuration, example test files, and integration for continuous testing.
- Playwright E2E Tests: Contains test files (
tests/) to cover various testing scenarios (e.g., UI interactions, data validation). - TypeScript: All tests and configurations are written using TypeScript for better code quality and scalability.
- CI/CD Integration: Utilizes GitHub Actions for Continuous Integration, ensuring tests automatically run on every code push (see
.github/workflows/playwright.yml).
| Component | Technology | Description |
|---|---|---|
| Testing Framework | Playwright | Automation tool for reliable end-to-end testing. |
| Language | TypeScript | Primary language for writing tests and configuration. |
| Package Manager | npm | Used for managing project dependencies. |
To run these tests on your local machine, follow these steps:
You must have Node.js installed on your system.
-
Clone the repository:
git clone [https://github.com/AishwaryaPande/AishwaryaPande.git](https://github.com/AishwaryaPande/AishwaryaPande.git) cd AishwaryaPande -
Install dependencies:
npm install
This command installs Playwright and automatically sets up the required browsers (Chromium, Firefox, WebKit).
All tests are configured via playwright.config.js.
Execute all test files in the tests/ directory across all configured browsers:
npx playwright test
2. View the HTML Test Report
After running your tests, you can open a detailed, interactive HTML report:
Bash
npx playwright show-report
3. Run a specific test file or project
To run tests in only one browser (e.g., Chrome):
Bash
npx playwright test --project=chromium
Repository Structure
File/Folder Purpose
tests/ Location for all End-to-End test files.
playwright.config.js Main configuration file for Playwright.
.github/workflows/ Contains the GitHub Actions workflow for CI/CD.
package.json Lists all project dependencies.
.env Used for environment-specific variables (Git should ignore secrets).