DEV Community

Cover image for ๐Ÿš€ Built a Full CI/CD Pipeline with Playwright + Docker + Allure in Just 2 Days
Artur DefToExplore
Artur DefToExplore

Posted on

๐Ÿš€ Built a Full CI/CD Pipeline with Playwright + Docker + Allure in Just 2 Days

When I started this project, my goal was simple:
๐Ÿ‘‰ to build a universal, self-contained CI/CD test pipeline that could run anywhere โ€” locally or in the cloud โ€” with just one command.

๐Ÿ’ก The Idea
I wanted to connect everything a modern QA engineer needs into one reproducible environment:

Playwright (TypeScript) โ†’ for end-to-end UI tests
Docker โ†’ for clean, isolated execution
Allure & Playwright HTML reports โ†’ for beautiful test results
A shared NPM SDK library โ†’ for reusable logic and faster scaling

๐Ÿ’ฌ In short โ€” a full test platform thatโ€™s portable, modular, and ready to grow.
``
๐Ÿงฉ The Architecture
This setup consists of two repositories that work together:

๐Ÿง  1. sdk_automation
Published as an NPM package โ†’ sdk_automation on npm
This SDK contains all shared test logic โ€” API helpers, MongoDB connectors, data generators, and utilities โ€” covered by Jest unit tests for reliability.
Think of it as the โ€œbrainsโ€ of your automation.

๐Ÿงช 2. qa-portfolio
This repository is the Playwright E2E test environment.

It uses:
Dockerfile + docker-compose.yml โ†’ for reproducible builds
Playwright test runner โ†’ for UI automation
Allure & HTML reports โ†’ for rich visual reporting
A single entry point command:

docker compose up --build -d; docker compose exec -w /work/playwright_ts playwright_ts sh -c "npm install && npx playwright test --reporter=html"

This builds, runs, and serves the full test report โ€” no manual setup, no global dependencies.

โš™๏ธ What Happens Under the Hood
When you run:
docker compose up --build
Hereโ€™s what happens step-by-step:
Docker builds the Playwright image
The SDK (npm package) installs automatically
Tests run inside the container using Playwright
HTML report is generated after completion
The report is auto-served via serve on port 8080
You can open it locally with:
start ./playwright_ts/playwright-report/index.html

Playwright HTML Test Report showing executed tests, passed and failed cases, and detailed results

๐Ÿณ Run from Docker Hub You can run the full Playwright + Docker + Allure CI/CD pipeline directly from Docker Hub โ€” no cloning, no setup, just one command
docker run --rm -it mybono/qa-portfolio:latest

โœ… One command โ†’ full CI/CD simulation.
Works on Windows, macOS, and Linux.
๐Ÿ“Š The Result
Reusable SDK with strongly-typed logic
Automated E2E tests running in isolation
Beautiful Allure & Playwright reports
Fully reproducible Dockerized pipeline
Hereโ€™s a quick look at the Playwright HTML report output:

๐Ÿงฑ Tech Stack Overview
Layer Technology Purpose
Core Playwright + TypeScript UI testing framework
SDK Node.js NPM Package Shared logic and helpers
Reports Allure / Playwright HTML Test reporting
Environment Docker + docker-compose CI/CD containerization
DB MongoDB (via Docker) Test data layer

๐Ÿง  Lessons Learned
๐Ÿ’ก 1. Decouple test logic from frameworks โ€” SDKs make scaling painless.
โš™๏ธ 2. Docker ensures parity between local, CI, and cloud environments.
๐Ÿ“Š 3. Reports are key to visibility, not just decoration.
๐Ÿš€ 4. CI/CD begins with architecture โ€” not Jenkins.

๐Ÿ”ฎ Next Steps

  • Add Playwright on Python for multi-language support
  • ADD Slack notifications

โญ Star It, Fork It, Break It (Then Fix It)
If you like the idea โ€” star the repos and join the journey!
๐Ÿงฉ qa-portfolio
๐Ÿ“ฆ sdk_automation

Top comments (0)