UI Test Configuration Reference
Environment variables specific to UI test generation. These are set in your .env file alongside the standard RoostGPT variables (AI provider, Git platform, etc.) documented in the CLI Reference.
Set TEST_TYPE=ui-test and TEST_FRAMEWORK=playwright to enable UI test generation, then add the variables below as needed.
Exploration Variables
| Variable | Default | Description |
|---|---|---|
EXPLORE_MODE | balanced | Speed preset: fast, balanced, thorough |
EXPLORE_FOCUS_AREA | Constrain discovery to a specific area (natural language) | |
ENABLE_EDGE_EXPLORATION | false | Enable edge case / negative test discovery |
AGENT_WORKER_MAX_STEPS | 60 | Steps per workflow |
AGENT_CONCURRENT_WORKERS | 5 | Maximum parallel workers |
SCAN_EXISTING | false | Scan existing tests before exploring |
SCAN_TEST_DIR | Directory with existing tests to scan |
Authentication Variables
| Variable | Default | Description |
|---|---|---|
LOGIN_TYPE | Auth type: embedded_login, google, okta, none | |
UI_SITE_USERNAME | Login username or email | |
UI_SITE_PASSWORD | Login password (stored securely) | |
LOGIN_URL | BASE_URL | Custom login page URL |
PLAYWRIGHT_LOGIN_SCRIPT | Path to custom Playwright login script |
OTP / MFA Variables
| Variable | Default | Description |
|---|---|---|
UI_OTP_SECRET | Base32 TOTP shared secret | |
UI_OTP_DIGITS | 6 | OTP code length |
UI_OTP_ALGORITHM | sha1 | Hash: sha1, sha256, sha512 |
UI_OTP_PERIOD | 30 | Time period in seconds |
UI_OTP_SCRIPT_PATH | Custom OTP script path |
Test Generation Variables
| Variable | Default | Description |
|---|---|---|
GENERATE_AFTER_EXPLORE | false | Auto-generate tests after exploration |
ENABLE_POM_TESTS | true | Generate Page Object Model tests |
ENABLE_TEST_ITERATION | true | Run tests after generation and iterate on failures |
TEST_MAX_ITERATIONS | 5 | Max test fix iterations |
MAX_ALTERNATIVE_SELECTORS | 3 | Number of fallback selectors per element |
TEST_SELECTOR_MIN_CONFIDENCE | 60 | Minimum selector confidence score (0-100) |
ENABLE_TEST_DATA_VARIATIONS | false | Generate parameterized test data |
USER_SCENARIO_FILE_PATH | Path to custom scenario files (natural language input) |
Browser Variables
| Variable | Default | Description |
|---|---|---|
BROWSER_USE_HEADLESS | true | Run browser in headless mode |
ENABLE_VIDEO_RECORDING | true | Record browser video during exploration |
UI_VIEWPORT | Custom viewport (e.g., 1920x1080) | |
PLAYWRIGHT_TIMEOUT | 120000 | Page-level timeout in ms |
Report Variables
| Variable | Default | Description |
|---|---|---|
GENERATE_EXPLORE_PDF | true | Generate PDF reports per workflow |
ENABLE_DEEPDIVE_SCREENSHOTS | true | Capture screenshots for PDF reports |
USER_LANGUAGE | English | Language for output and reports (21+ languages supported) |
Site Memory Variables
| Variable | Default | Description |
|---|---|---|
ENABLE_SITE_MEMORY | false | Enable per-domain persistent learning |
ENABLE_GLOBAL_MEMORY_SYNC | false | Share memory across teams |
Token Tracking Variables
| Variable | Default | Description |
|---|---|---|
ENABLE_TOKEN_TRACKING | true | Track AI token usage and costs |
TOKEN_TRACKING_DETAILED | false | Enable detailed per-call logging |
Pipeline Variables
| Variable | Default | Description |
|---|---|---|
SKIP_DEPENDENCY_INSTALLATION | false | Skip npm install if cached |
Example .env File
# Standard RoostGPT variables (see CLI Reference for full list)
TEST_TYPE=ui-test
TEST_FRAMEWORK=playwright
AI_TYPE=openai
OPENAI_API_KEY=sk-your-key-here
OPENAI_API_MODEL=gpt-4o
# UI test specific — target URL
URLS_TO_TEST=https://your-app.example.com
# Authentication
LOGIN_TYPE=embedded_login
UI_SITE_USERNAME=testuser@example.com
UI_SITE_PASSWORD=your-test-password
# Exploration
EXPLORE_MODE=balanced
ENABLE_EDGE_EXPLORATION=true
# Test generation
ENABLE_POM_TESTS=true
GENERATE_AFTER_EXPLORE=true
# Browser
BROWSER_USE_HEADLESS=true
# Reports
GENERATE_EXPLORE_PDF=true
USER_LANGUAGE=English
roostgpt test create -c ui-test.env