Library › Book 1 › CI/CD Integration
CI/CD Integration
14.1🔒OverviewA framework that only runs on your laptop is a demo. This chapter takes the architecture into CI: GitHub Actions, a runner script, Docker…
14.2🔒Principles1. Headless in CI -- --headed is a local-development flag 2. Fresh session per test -- one named session per test, closed at the end 3…
14.3🔒GitHub Actions ConfigurationTwo things changed from 2025-era setups. First, browsers and system dependencies come from Playwright's own installer (npx playwright…
14.4🔒The Test Runner ScriptThe structure to internalize: the pw() wrapper binds every command to the current test's named session; the failure branch captures…
14.5🔒Authentication in CIFresh sessions per test plus login-per-test would make auth the slowest part of the suite. The saved-state pattern (Chapter 13.4) fixes…
14.6🔒Docker ConfigurationNo twenty-line apt-get install block -- --with-deps owns the system library list. You can also start from Microsoft's official image…
14.7🔒Parallel Execution in CITwo layers, both built on named sessions:
14.8🔒Artifact ManagementCapture screenshots always (~100KB each), YAML snapshots on failure (agent re-analysis), console logs, results JSON -- and Playwright…
14.9🔒Key Takeaways- Five CI principles: headless, fresh named session per test, artifacts on failure, deterministic timeouts, meaningful exit codes - npx…
14.10🔒Q&ASelf-Assessment Quiz1. Why use npx playwright install --with-deps instead of an apt-get list? 2. What provides test isolation in CI? 3. Where does the one real…
14.11🔒Exercises[Beginner] Exercise 14.1: Create a GitHub Actions workflow that installs the Playwright CLI on Node 24, installs Chromium with --with-deps…
14.12🔒Career Translation- Designed a CI/CD pipeline for AI-driven browser tests using GitHub Actions, Docker, and the Playwright CLI, running test groups in…
14.13🔒Q&AInterview Depth CheckPrompt: Set up a CI pipeline for a team new to AI-driven browser tests. Walk through your GitHub Actions configuration.