Skip to main content

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

VariableDefaultDescription
EXPLORE_MODEbalancedSpeed preset: fast, balanced, thorough
EXPLORE_FOCUS_AREAConstrain discovery to a specific area (natural language)
ENABLE_EDGE_EXPLORATIONfalseEnable edge case / negative test discovery
AGENT_WORKER_MAX_STEPS60Steps per workflow
AGENT_CONCURRENT_WORKERS5Maximum parallel workers
SCAN_EXISTINGfalseScan existing tests before exploring
SCAN_TEST_DIRDirectory with existing tests to scan

Authentication Variables

VariableDefaultDescription
LOGIN_TYPEAuth type: embedded_login, google, okta, none
UI_SITE_USERNAMELogin username or email
UI_SITE_PASSWORDLogin password (stored securely)
LOGIN_URLBASE_URLCustom login page URL
PLAYWRIGHT_LOGIN_SCRIPTPath to custom Playwright login script

OTP / MFA Variables

VariableDefaultDescription
UI_OTP_SECRETBase32 TOTP shared secret
UI_OTP_DIGITS6OTP code length
UI_OTP_ALGORITHMsha1Hash: sha1, sha256, sha512
UI_OTP_PERIOD30Time period in seconds
UI_OTP_SCRIPT_PATHCustom OTP script path

Test Generation Variables

VariableDefaultDescription
GENERATE_AFTER_EXPLOREfalseAuto-generate tests after exploration
ENABLE_POM_TESTStrueGenerate Page Object Model tests
ENABLE_TEST_ITERATIONtrueRun tests after generation and iterate on failures
TEST_MAX_ITERATIONS5Max test fix iterations
MAX_ALTERNATIVE_SELECTORS3Number of fallback selectors per element
TEST_SELECTOR_MIN_CONFIDENCE60Minimum selector confidence score (0-100)
ENABLE_TEST_DATA_VARIATIONSfalseGenerate parameterized test data
USER_SCENARIO_FILE_PATHPath to custom scenario files (natural language input)

Browser Variables

VariableDefaultDescription
BROWSER_USE_HEADLESStrueRun browser in headless mode
ENABLE_VIDEO_RECORDINGtrueRecord browser video during exploration
UI_VIEWPORTCustom viewport (e.g., 1920x1080)
PLAYWRIGHT_TIMEOUT120000Page-level timeout in ms

Report Variables

VariableDefaultDescription
GENERATE_EXPLORE_PDFtrueGenerate PDF reports per workflow
ENABLE_DEEPDIVE_SCREENSHOTStrueCapture screenshots for PDF reports
USER_LANGUAGEEnglishLanguage for output and reports (21+ languages supported)

Site Memory Variables

VariableDefaultDescription
ENABLE_SITE_MEMORYfalseEnable per-domain persistent learning
ENABLE_GLOBAL_MEMORY_SYNCfalseShare memory across teams

Token Tracking Variables

VariableDefaultDescription
ENABLE_TOKEN_TRACKINGtrueTrack AI token usage and costs
TOKEN_TRACKING_DETAILEDfalseEnable detailed per-call logging

Pipeline Variables

VariableDefaultDescription
SKIP_DEPENDENCY_INSTALLATIONfalseSkip 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