Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.91 KB

File metadata and controls

47 lines (29 loc) · 1.91 KB

Browser Profile Testing Workflows

This guide shows how isolated Playwright profiles fit into authorized QA and development work.

Separate application environments

Use a distinct profile for local, staging, and production verification. This keeps cookies, feature flags, and cached assets from crossing environment boundaries.

node src/cli.js create catalog-local
node src/cli.js create catalog-staging
node src/cli.js create catalog-production

Localization matrix

Create profiles whose names explain the expected test dimension:

node src/cli.js create checkout-en-us --locale en-US --timezone America/New_York --viewport 1440x900
node src/cli.js create checkout-en-gb --locale en-GB --timezone Europe/London --viewport 1440x900
node src/cli.js create checkout-ja-jp --locale ja-JP --timezone Asia/Tokyo --viewport 1280x800

Locale and timezone configuration help reproduce rendering and date-format behavior. They do not change network location.

Manual login followed by automation

  1. Launch the profile visibly.
  2. Sign in to an authorized test account.
  3. Close the browser.
  4. Relaunch the same profile from a test script.

The automation never needs a plaintext password. The session remains local in Chromium's storage.

Bug reproduction

Create a profile named after the issue or environment, reproduce the state, and record the CLI metadata in the bug report. Do not attach the user-data directory. Remove the profile after the issue is resolved.

CI diagnostics

Run doctor --json before an integration job and store the diagnostic result as a build artifact. It contains paths and readiness results, not cookies or browsing data. Run list --json only when profile names and local paths are acceptable in CI logs.

Parallel execution

Never launch one profile from multiple workers. Assign a unique profile to each worker, or use ephemeral Playwright contexts when persistence is unnecessary.