Prompt
What should I use for browser automation in CI/CD?
Latest observation
Oct 26, 2026
OpenAI APIWeb search: off
For browser automation in CI/CD, the safest default choice is usually:
Recommended default
Playwright
Why Playwright is a strong CI/CD choice
- Reliable in headless environments: built for automation and tends to be stable in CI.
- Cross-browser support: Chromium, Firefox, WebKit.
- Auto-waiting: reduces flaky tests.
- Easy setup: good Docker support and built-in browser management.
- Parallelization/sharding: useful for speeding up CI pipelines.
- Strong debugging tools: traces, screenshots, video, logs.
When to choose something else
Use Cypress if:
- Your team already uses it heavily
- You mainly test modern web apps in Chromium-like browsers
- You want a very developer-friendly local test experience
Tradeoff: great DX, but less flexible than Playwright for broader browser coverage and some advanced automation needs.
Use Selenium/WebDriver if:
- You need compatibility with an existing Selenium grid
- You have legacy test infrastructure
- You need support for many languages/frameworks in a mature ecosystem
Tradeoff: more setup and more flakiness potential unless carefully managed.
Use Puppeteer if:
- You only need Chromium automation
- You’re doing scraping or Chrome-specific tasks
Tradeoff: narrower browser support than Playwright.
Practical CI/CD recommendation
If you’re starting fresh:
- Use Playwright
- Run tests in Docker or a CI image with browsers installed
- Use headless mode
- Enable:
- retries for flaky tests
- screenshots/video on failure
- trace collection
- Split tests across CI workers if the suite grows
Quick rule of thumb
- Best overall: Playwright
- Best for existing Selenium setups: Selenium
- Best for Chrome-only automation: Puppeteer
- Best if your team already loves it: Cypress
If you want, I can also recommend a setup for your specific CI system like GitHub Actions, GitLab CI, Jenkins, or Azure DevOps.