Skip to content
ํ”„๋กœ์ ํŠธ

์†Œ๊ฐœ

Enterprise-Grade Playwright Python Architecture ๐ŸŽญ | Production-Ready Boilerplate with Pytest, Allure.

๊ฐœ๋ฐœ ๋„๊ตฌ

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

What you can do

  • Modern Tooling: Powered by uv for blazing fast package management and Ruff for linting.
  • Accessibility First: Integrated Axe scans to ensure your app is accessible to everyone.
  • Deep Debugging: Full integration with Playwright Traces and Video recording linked directly to Allure Reports.
  • Cloud Scale: Native integration with BrowserStack for cross-browser testing on real devices.

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

README.md

Original
Playwright Logo

Enterprise-Grade Playwright Python Architecture

The Ultimate Boilerplate for Scalable, Robust, and Modern UI Automation

Twitter Follow YouTube Architecture by TestShift CI Status Nightly Build Tests uv Ruff

View Live Report โ€ข Read The Docs โ€ข Report Bug


๐Ÿš€ About The Project

This repository is a Production-Ready Reference Architecture for building next-generation test automation using Playwright and Python.

It goes beyond basic scripts to demonstrate a fully scalable framework with advanced features like Accessibility Testing (A11y), visual tracing, and cloud integration, tailored for modern DevOps pipelines.

Automation College - Playwright Python Course

โœจ Key Features

  • Modern Tooling: Powered by uv for blazing fast package management and Ruff for linting.
  • Accessibility First: Integrated Axe scans to ensure your app is accessible to everyone.
  • Deep Debugging: Full integration with Playwright Traces and Video recording linked directly to Allure Reports.
  • Cloud Scale: Native integration with BrowserStack for cross-browser testing on real devices.
  • CI/CD Optimization: Parallel execution strategies and dynamic version syncing for GitHub Actions.

๐Ÿ“ƒ Articles written about this project

This project implements the concepts discussed in the following TestShift articles:


๐Ÿ› ๏ธ Tech Stack

Tool Description & Why We Use It
Playwright The modern standard for reliable, flaky-free browser automation.
Pytest The most powerful testing framework for Python.
Axe Playwright For automated accessibility (A11y) compliance testing.
Allure For beautiful, data-rich test reports including Traces & Video.
Pytest Split To intelligently split test suites for parallel execution.
Requests For API interactions and test data setup.

๐ŸŒ Cloud Testing Provider

This project is powered by BrowserStack, enabling high-scale cross-browser and mobile testing on real devices in the cloud.


Agent environment setup

For an AI coding agent, use the repository's setup-env skill to install locked dependencies and Chromium without running tests. In Codex, invoke it with $setup-env.

โš™๏ธ Getting Started

1. Clone

git clone https://github.com/nirtal85/Playwright-Python-Example
cd playwright-python

2. Install (The Modern Way)

We use uv for lightning-fast installations.

Windows (PowerShell):

python -m pip install uv
python -m uv venv
.venv\Scripts\Activate.ps1
uv sync --all-extras --dev
playwright install

Mac/Linux:

python3 -m pip install uv
uv venv
source .venv/bin/activate
uv sync --all-extras --dev
playwright install

๐Ÿƒโ€โ™‚๏ธ Execution

Run all tests (Chromium by default):

pytest

Run specific suite (Tags):

pytest -m sanity

๐Ÿ“Š Results, Traces & Debugging

We use Allure for reporting. To generate and open the report locally:

npx -y allure generate allure-results --output allure-report --open

๐Ÿ‘‰ See a Live Example of the Report Here

๐Ÿ•ต๏ธโ€โ™€๏ธ Using the Trace Viewer

Navigate to the Playwright Trace Viewer.

Drag & Drop the trace file (located in test-results/) generated after a failure.

Time Travel: Move back and forth in the timeline to see exactly what happened (Network, DOM, Console).


Found this project useful? If this architecture helped you solve a problem or save time, consider supporting the work!

Buy Me A Coffee


Visit TestShift.com for more Architectural Insights

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ