playmatic.config.ts
) to control two main categories of settings: Runtime Settings that affect how tests execute, and Test Environments that define the application instances your tests can target.
Runtime Settings
Runtime settings control the default behavior and performance characteristics of your test execution.playmatic.config.ts
defaultEnv
(string)
Specifies which environment to use when no environment is explicitly provided.
cacheSettings
(object)
Performance configuration for test execution:
actionTimeout
(number): Timeout in milliseconds for cached actions like.click()
,.fill()
- Default: 10000 (10 seconds)
Test Environments
Test environments define the different application instances your tests can target. Each environment includes a base URL and optional variables.Test Environment Structure
Each test environment key (e.g., “production”, “staging”, “development”) contains:baseUrl
(string): The base URL for the application instancevars
(object, optional): Environment-specific variables accessible viaenv.vars
in tests
playmatic.config.ts
Selecting Test Environments
Test environments can be selected when running tests:- Locally via CLI: Use the
--env
flag to override the default test environment - In CI: Configure the test environment in your GitHub Actions workflow file
Using Environment Variables
Access environment variables in your tests usingenv.vars
: