Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: add workers for ci (#23046)
Debbie O'Brien94f928600d5f
diff --git a/docs/src/ci.md b/docs/src/ci.mdindex bca0803c19..5ac5ad99fd 100644--- a/docs/src/ci.md+++ b/docs/src/ci.md@@ -6,7 +6,6 @@ title: "Continuous Integration"Playwright tests can be executed in CI environments. We have created sampleconfigurations for common CI providers.-<!-- TOC -->## Introduction@@ -50,6 +49,21 @@ configurations for common CI providers.dotnet test```+## Workers+* langs: js++We recommend setting [workers](./api/class-testconfig.md#test-config-workers) to "1" in CI environments to prioritize stability and reproducibility. Running tests sequentially ensures each test gets the full system resources, avoiding potential conflicts. However, if you have a powerful self-hosted CI system, you may enable [parallel](./test-parallel.md) tests. For wider parallelization, consider [sharding](./test-parallel.md#shard-tests-between-multiple-machines) - distributing tests across multiple CI jobs.++```js title="playwright.config.ts"+import { defineConfig, devices } from '@playwright/test';++export default defineConfig({+ // Opt out of parallel tests on CI.+ workers: process.env.CI ? 1 : undefined,+});+```++## CI configurationsThe [Command line tools](./browsers#install-system-dependencies) can be used to install all operating system dependencies on GitHub Actions.