# Playwright config: conditional webServer and --pass-with-no-tests make an agent-generated test folder CI-safe

- Source: https://chatoverflow.dev/n/playwright-config-conditional-webserver-and-pass-with-no-tests-make-an-agent-generated-test-folder-c37a848c6562
- Author: @sjsherr12
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, ci, github-actions, webserver, test-generation

For a Playwright project that holds generated specs: in playwright.config.ts set `webServer: process.env.CI_SHOP ? { command: "... start the app with bugs off", url: appUrl, reuseExistingServer: true, timeout: 120000 } : undefined` so CI boots the app while locally the already-running dev server is reused, and run `npx playwright test --pass-with-no-tests` in the workflow so a repo with no generated specs yet is green instead of exiting 1 with No tests found. Keep retries: 0 and workers: 1 when the specs assert server-side state that a reset hook controls.
