This document provides a comprehensive guide to all environment variables and configuration options available in TestZeus Hercules.
- Core Environment Variables
- LLM Configuration
- Browser Configuration
- Testing Configuration
- Device Configuration
- Logging and Debugging
- Advanced Configuration
- Configuration Priority
-
MODE
: Sets the execution mode- Values:
prod
ordebug
- Default:
prod
- Usage: Debug mode sets timestamp to "0" and enables additional logging
- Implementation: Used in
BaseConfigManager
to control logging verbosity and timestamp behavior
- Values:
-
PROJECT_SOURCE_ROOT
: Base directory for project files- Default:
./opt
- Usage: All other paths are relative to this directory
- Implementation: Used as the base path for all file operations and directory structures
- Default:
The following paths are automatically created relative to PROJECT_SOURCE_ROOT
:
{
"INPUT_GHERKIN_FILE_PATH": "{PROJECT_SOURCE_ROOT}/input/test.feature",
"JUNIT_XML_BASE_PATH": "{PROJECT_SOURCE_ROOT}/output",
"TEST_DATA_PATH": "{PROJECT_SOURCE_ROOT}/test_data",
"SCREEN_SHOT_PATH": "{PROJECT_SOURCE_ROOT}/proofs",
"PROJECT_TEMP_PATH": "{PROJECT_SOURCE_ROOT}/temp",
"SOURCE_LOG_FOLDER_PATH": "{PROJECT_SOURCE_ROOT}/log_files",
"TMP_GHERKIN_PATH": "{PROJECT_SOURCE_ROOT}/gherkin_files"
}
Each directory is created automatically when accessed through the corresponding getter methods in BaseConfigManager
.
There are two ways to configure LLM, with the following priority:
- Direct Environment Variables:
LLM_MODEL_NAME=<model_name>
LLM_MODEL_API_KEY=<api_key>
LLM_MODEL_BASE_URL=<base_url>
LLM_MODEL_API_TYPE=<api_type>
LLM_MODEL_API_VERSION=<api_version>
LLM_MODEL_PROJECT_ID=<project_id>
LLM_MODEL_REGION=<region>
- Configuration File:
AGENTS_LLM_CONFIG_FILE=agents_llm_config.json
AGENTS_LLM_CONFIG_FILE_REF_KEY=<provider_key>
The agents_llm_config.json
supports multiple providers and agent configurations. Each provider can have different configurations for different agents:
{
"<provider>": {
"planner_agent": {
"model_name": "<model_name>",
"model_api_type": "<api_type>",
"model_base_url": "<base_url>",
"llm_config_params": {
"temperature": 0.0,
"top_p": 0.001,
"seed": 12345
}
},
"nav_agent": { ... },
"mem_agent": { ... },
"helper_agent": { ... }
}
}
planner_agent
: Responsible for high-level test planning and strategynav_agent
: Handles browser navigation and interactionmem_agent
: Manages memory and context during test executionhelper_agent
: Provides support functions and utilities
Model Configuration:
model_name
: Name of the model to usemodel_api_type
: Type of API (e.g., "openai", "anthropic", "azure", "mistral", "groq", "ollama")model_base_url
: Base URL for API requestsmodel_api_version
: API version (if applicable)model_client_host
: Client host for local modelsmodel_native_tool_calls
: Enable native tool callsmodel_hide_tools
: Tool hiding behavior
LLM Parameters:
temperature
: Controls randomness in responses (0.0 to 1.0)top_p
: Nucleus sampling parameter (0.0 to 1.0)seed
: Random seed for reproducibility
-
BROWSER_TYPE
: Type of browser to use- Values:
chromium
,firefox
,webkit
- Default:
chromium
- Implementation: Used in
PlaywrightManager
for browser initialization
- Values:
-
BROWSER_CHANNEL
: Browser channel/version- Values:
chrome
,chrome-beta
,chrome-dev
,chrome-canary
,msedge
,msedge-beta
,msedge-dev
,msedge-canary
,firefox
,firefox-beta
,firefox-dev-edition
,firefox-nightly
- Default: stable channel
- Implementation: Used to select specific browser channels for testing
- Values:
-
BROWSER_VERSION
: Specific browser version- Values: version number or
latest
- Example:
114
,115.0.1
,latest
- Implementation: Controls browser version selection in
PlaywrightManager
- Values: version number or
-
HEADLESS
: Run browser in headless mode- Values:
true
,false
- Default:
true
- Implementation: Controls browser visibility during test execution
- Values:
-
BROWSER_RESOLUTION
: Browser window resolution- Format:
width,height
- Example:
1920,1080
- Implementation: Sets viewport size in
PlaywrightManager
- Format:
-
DONT_CLOSE_BROWSER
: Keep browser open after test- Values:
true
,false
- Default:
false
- Implementation: Controls browser cleanup behavior
- Values:
-
EXECUTE_BULK
: Execute tests in bulk from tests directory- Values:
true
,false
- Default:
false
- Implementation: Used in test runners for batch processing
- Values:
-
REUSE_VECTOR_DB
: Reuse existing vector DB- Values:
true
,false
- Default:
false
- Implementation: Controls vector database caching behavior
- Values:
-
RECORD_VIDEO
: Record test execution videos- Values:
true
,false
- Default:
true
- Implementation: Managed by
PlaywrightManager
for video capture
- Values:
-
TAKE_SCREENSHOTS
: Take screenshots during test- Values:
true
,false
- Default:
true
- Implementation: Controls screenshot capture in
PlaywrightManager
- Values:
-
CAPTURE_NETWORK
: Capture network traffic- Values:
true
,false
- Default:
true
- Implementation: Enables network request/response logging
- Values:
-
REACTION_DELAY_TIME
: Delay between actions- Default:
0.1
(seconds) - Implementation: Controls timing between test steps
- Default:
-
USE_DYNAMIC_LTM
: Use dynamic long-term memory- Values:
true
,false
- Default:
false
- Implementation: Controls memory management strategy
- Values:
RUN_DEVICE
: Target device for testing- Example:
desktop
,iPhone 15 Pro Max
- Default:
desktop
- Implementation: Used in
PlaywrightManager
for device emulation - Note: Setting to iPhone automatically switches to WebKit browser
- Example:
-
GEOLOCATION
: Geographic location for testing- Format: JSON object with latitude and longitude
- Example:
{"latitude": 51.5, "longitude": -0.13}
-
TIMEZONE
: Timezone for testing- Format: IANA timezone string
- Example:
America/New_York
-
LOCALE
: Locale settings- Default:
en-US
- Implementation: Controls browser language and formatting
- Default:
-
ENABLE_BROWSER_LOGS
: Enable browser console logging- Values:
true
,false
- Default:
false
- Implementation: Captures browser console output
- Values:
-
TOKEN_VERBOSE
: Enable verbose token logging- Values:
true
,false
- Default:
false
- Implementation: Controls token usage logging
- Values:
-
LOG_MESSAGES_FORMAT
: Format for log messages- Values:
text
,json
- Default:
text
- Implementation: Controls logger output format in
logger.py
- Values:
-
ENABLE_PLAYWRIGHT_TRACING
: Enable Playwright tracing- Values:
true
,false
- Default:
false
- Implementation: Enables detailed Playwright traces
- Values:
-
ENABLE_BOUNDING_BOX_SCREENSHOTS
: Enable bounding box in screenshots- Values:
true
,false
- Default:
false
- Implementation: Adds visual element highlighting
- Values:
-
CDP_ENDPOINT_URL
: Chrome DevTools Protocol endpoint- Usage: Remote debugging or custom browser instances
- Implementation: Used for remote browser control
-
HF_HOME
: Hugging Face models cache directory- Default:
./.cache
- Implementation: Controls model caching location
- Default:
-
TOKENIZERS_PARALLELISM
: Enable parallel tokenization- Values:
true
,false
- Default:
false
- Implementation: Controls tokenizer performance
- Values:
-
ENABLE_TELEMETRY
: Enable usage telemetry- Values:
0
,1
- Default:
1
- Implementation: Controls telemetry data collection
- Values:
-
AUTO_MODE
: Indicates automatic execution- Values:
0
,1
- Default:
0
- Implementation: Used for telemetry and execution mode
- Values:
-
LOAD_EXTRA_TOOLS
: Load additional testing tools- Values:
true
,false
- Default:
false
- Implementation: Controls loading of optional tools
- Values:
-
COLOR_SCHEME
: Color scheme for browser- Values:
light
,dark
- Default:
light
- Implementation: Sets browser color scheme preference
- Values:
The system follows this configuration priority order:
- Command Line Arguments
- Environment Variables
- Configuration Files
- Default Values
This means that command-line arguments override environment variables, which override configuration files, which override default values.