-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
85 lines (70 loc) · 4.01 KB
/
Copy path.env.example
File metadata and controls
85 lines (70 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copy this file to .env and fill in your values.
# .env is gitignored — never commit real credentials.
# ── Required ──────────────────────────────────────────────────────────────────
# Base URL for the app under test.
# Overrides the baseURL in playwright.config.ts.
# Example: https://www.example.com/us/en
BASE_URL=
# Login credentials for authenticated tests.
# Used by e2e/tests/auth.setup.ts to save playwright/.auth/user.json.
# In CI: set these as encrypted repository secrets, not plain variables.
TEST_USERNAME=
TEST_PASSWORD=
# Set to "true" if your app requires authentication.
# When true, the setup project runs auth.setup.ts before all tests.
# When false (default), tests run without auth — safe for public apps.
AUTH_REQUIRED=false
# ── Multi-profile credentials (optional) ──────────────────────────────────────
# For tests that need multiple identities. The unsuffixed TEST_USERNAME /
# TEST_PASSWORD above is the "user" profile. Add per-profile credentials with
# a suffix — auth.setup.ts iterates whichever pairs are present and writes
# playwright/.auth/{name}.json for each.
#
# Tag a feature with @profile:<name> to bind the whole spec to that profile's
# storageState. Use the loginAs('<name>') fixture for tests that need multiple
# profiles in a single scenario.
#
# Profile naming is free-form. Common shapes:
# Per-region: TEST_USERNAME_CA, TEST_USERNAME_TX, TEST_USERNAME_FL
# Per-tenant: TEST_USERNAME_TENANT_ACME, TEST_USERNAME_TENANT_BETA
# Per-locale: TEST_USERNAME_EN_US, TEST_USERNAME_EN_GB, TEST_USERNAME_FR_FR
# RBAC: TEST_USERNAME_ADMIN, TEST_USERNAME_VIEWER
#
# TEST_USERNAME_CA=
# TEST_PASSWORD_CA=
# Optional: limit which profiles the setup project runs. Comma-separated, lowercase.
# Useful for local dev (skip slow setup) and sharded CI (split by profile group).
# Leave unset to set up all discovered profiles.
# AUTH_PROFILES=ca,tx,fl
# Optional: switch from "one spec → one profile (tag-driven)" to "every spec runs
# once per discovered profile" — one Playwright project per profile. Use this
# when you want the same suite executed against every identity (e.g. running the
# full regression against all 50 US-state agent logins, or against admin AND
# viewer side-by-side). CI cost scales with profile count; pair with shards.
# Default: false (tag-driven mode).
# MULTI_PROFILE_PROJECTS=true
# ── Optional ──────────────────────────────────────────────────────────────────
# Attribute that getByTestId('...') resolves against. Default: Playwright's
# standard `data-testid`. Set this only if your app uses a different convention
# (e.g. hyphenated `data-test-id`, or a framework-specific `data-qa`).
# TEST_ID_ATTRIBUTE=data-test-id
# Set to "true" in CI environments.
# Playwright uses this to enable retries and stricter timeouts.
# CI=true
# Override the default browser context timeout (ms). Default: 30000.
# PLAYWRIGHT_TIMEOUT=30000
# Run only @alpha-tagged tests. Used by the e2e-smoke CI job and locally when
# you want a fast signal across a large suite.
# SMOKE_ONLY=true
# Override Playwright's worker count. Defaults: auto locally, 4 in CI.
# Scale up on larger runners; scale down for bot-sensitive targets.
# WORKERS=4
# Pre-warm a browser cookie jar before tests. Enable ONLY when the target WAF
# intermittently returns 406 on first-visit fingerprints (empty cookie jar).
# Ignored when AUTH_REQUIRED=true (auth state already contains cookies).
# See playwright.config.ts and README.md → Configuration for details.
# WARMUP=true
# Start a local dev server before the suite. Activates the commented-out
# webServer block in playwright.config.ts. Use only when testing a local app;
# leave unset when pointing at a remote URL.
# LOCAL_DEV=true