nirtal85/Playwright-Typescript-Example
์๊ฐ
Enterprise-Grade Playwright TypeScript Architecture ๐ญ | Production-Ready Boilerplate with Biome, Allure & CI/CD.
๊ฐ๋ฐ ๋๊ตฌWhat you can do
- Modern Tooling: Built with Biome for lightning-fast linting and formatting (replacing ESLint/Prettier).
- Strict TypeScript: Full type safety for robust and maintainable code.
- Smart Reporting: Full integration with Allure Report, including history, trends, and environment data.
- CI/CD Ready: Optimized GitHub Actions workflows with parallel execution and auto-merging of results.
์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- ๊ธฐ๋ก ์์ง ์ค
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
OriginalEnterprise-Grade Playwright TypeScript Architecture
The Ultimate Boilerplate for Scalable, Robust, and Modern UI Automation
View Live Report โข Read The Docs โข Report Bug
๐ About The Project
This repository serves as a Production-Ready Reference Architecture for building high-scale automated testing frameworks using Playwright and TypeScript.
It demonstrates advanced design patterns, seamless CI/CD integration, and strictly typed infrastructure that define modern Quality Engineering.
โจ Key Features
- Modern Tooling: Built with Biome for lightning-fast linting and formatting (replacing ESLint/Prettier).
- Strict TypeScript: Full type safety for robust and maintainable code.
- Smart Reporting: Full integration with Allure Report, including history, trends, and environment data.
- CI/CD Ready: Optimized GitHub Actions workflows with parallel execution and auto-merging of results.
- Advanced Patterns: Implementation of Dynamic Base URLs, Auto Fixtures, and Data-Driven Testing (DDT).
๐ Articles written about this project
This project implements the concepts discussed in the following TestShift articles:
- Test Automation - Accelerating Playwright TypeScript Tests with Parallel Execution in GitHub Actions and Allure Reporting
- Test Automation - How to Use Dynamic Base URLs with Playwright TypeScript in GitHub Actions
- Test Automation - How To Attach Public IP Address to Allure Report using Playwright TypeScript Auto Fixtures
- Test Automation - Data-Driven Testing (DDT) with Playwright TypeScript Using Excel
- Test Automation - Efficient Element Selection with Playwright Typescript using Test IDs
- Test Automation - Optimizing Playwright Test Reports: Automating Allure Results Merging with GitHub Actions
- Test Automation โ Unleashing the Power of AI with Playwright and TypeScript
- Guarding the Guards: Building a Pre-Merge Quality Gate for Your TypeScript Automation Framework
- Your CI/CD Pipeline Is a Lie: The Case for On-Demand Environments as the Real Quality Gate
- Allure 3 Isnโt Just an Upgrade. Itโs the Final Piece of the Quality Gate Architecture
๐ ๏ธ Tech Stack
| Tool | Description & Why We Use It |
|---|---|
| Playwright | The industry standard for reliable, flaky-free browser automation. |
| TypeScript | For strict type safety and better developer experience (Intellisense). |
| Biome | Next-gen toolchain for formatting and linting (faster than Prettier/ESLint). |
| Allure | For beautiful, data-rich test reports. |
| Husky | Git hooks to ensure code quality before commit. |
| Dotenv | For secure environment variable management. |
| XLSX | For Data-Driven Testing (DDT) using Excel files. |
Pro Tip: For the best development experience, we recommend installing the Biome IntelliJ plugin.
Agent environment setup
For an AI coding agent, use the repository's setup-env skill to install frozen dependencies and Chromium without running tests. In Codex, invoke it with $setup-env.
โ๏ธ Setup Instructions
1. Clone
git clone https://github.com/nirtal85/playwright-typescript-example.git
cd playwright-typescript-example
2. Install Dependencies
We use pnpm for fast and efficient package management.
corepack enable
pnpm install
3. Install Browsers
playwright install --with-deps
4. Configuration
Create a .env file in the project root directory.
General Configuration
| Parameter | Description | Example Value |
|---|---|---|
| DOMAIN | Environment (DEV, PROD) | "DEV" |
| BASE_URL | Application URL | "https://example.com" |
| LD_TOKEN | LaunchDarkly API Token | "api-xxx" |
Database & Services
| Parameter | Description |
|---|---|
| DB_HOST | MySQL Connection details |
| DB_USER | MySQL Connection details |
| DB_PASSWORD | MySQL Connection details |
| SFTP_HOST | SFTP Connection details |
| SFTP_USER | SFTP Connection details |
| VRT_APIURL | Visual Regression Tracker details |
| VRT_APIKEY | Visual Regression Tracker details |
๐โโ๏ธ Execution
Run all tests:
playwright test
Run via UI Mode (Interactive):
playwright test --ui
๐ Viewing Test Results
We use Allure for reporting. To view results locally:
pnpm exec allure generate allure-results --output allure-report --open
๐ See a Live Example of the Report Here
Found this project useful? If this architecture helped you solve a problem or save time, consider supporting the work!
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ