-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
142 lines (109 loc) · 6.89 KB
/
.env.example
File metadata and controls
142 lines (109 loc) · 6.89 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# ================================================================================
# Environment Configuration Template
# ================================================================================
# Copy this file to .env and fill in your actual values
# This file controls all framework behavior through environment variables
# ================================================================================
# REQUIRED CONFIGURATION
# ================================================================================
BASE_URL=https://your-application.com
TEST_USERNAME=test_user
TEST_PASSWORD=test_password
# ================================================================================
# BROWSER CONFIGURATION
# ================================================================================
# Browser type selection
BROWSER=chromium # Options: chromium | firefox | webkit
# Display settings
HEADLESS=true # Options: true | false (false shows browser window)
# Viewport configuration
VIEWPORT_WIDTH=1920 # Browser width in pixels
VIEWPORT_HEIGHT=1080 # Browser height in pixels
# Localization
BROWSER_LOCALE=en-US # Format: en-US, es-ES, fr-FR, de-DE, pt-BR, etc.
# User agent (optional - leave default if not needed)
USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
# Timeout settings
TIMEOUT=30000 # Default timeout in milliseconds (30000 = 30 seconds)
# ================================================================================
# TEST EXECUTION & STRATEGY
# ================================================================================
# Browser Strategy: Controls how browser is configured
# - local: Default for development (respects BROWSER, HEADLESS settings above)
# - debug: Slow motion (500ms), DevTools open, always visible
# - ci: Auto-selected when CI=true (headless, video recording, optimized)
TEST_MODE=local # Options: local | debug
# HTTP Configuration Mode: Controls default HTTPConfig preset for API clients
# - standard: Most API testing (3 retries, 30s timeout) - DEFAULT
# - external_api: Third-party APIs (5 retries, 60s timeout, patient)
# - local_api: Docker/localhost APIs (1 retry, 10s timeout, fail fast)
# - testing: Fast unit tests (no retries, 5s timeout, minimal logging)
HTTP_CONFIG_MODE=standard # Options: standard | external_api | local_api | testing
# Parallel execution with pytest-xdist
# Examples:
# pytest -n auto # Auto-detect CPU cores
# pytest -n 4 # Use 4 workers
# pytest -n 1 # Sequential execution (for debugging)
PYTEST_WORKERS=auto # Options: auto | 1 | 2 | 4 | 8
# Screenshot configuration
SCREENSHOT_ON_FAILURE=true # Capture screenshots when tests fail
SCREENSHOTS_DIR=screenshots # Directory to save screenshots
# ================================================================================
# LOGGING CONFIGURATION
# ================================================================================
DEBUG=true # DEBUG level for development, INFO for production
CI=false # Set to true in CI/CD pipelines (enables file logging + CIStrategy)
# ================================================================================
# DATABASE TESTING (Optional)
# ================================================================================
DB_TEST=false # Enable/disable database testing
# Database connection settings (required if DB_TEST=true)
DB_TYPE=postgresql # Options: postgresql | mysql | mssql | oracle
DB_HOST=localhost # Database host
DB_PORT=5432 # Port: 5432 (PostgreSQL) | 3306 (MySQL) | 1433 (MSSQL) | 1521 (Oracle)
DB_NAME=testdb # Database name
DB_USER=postgres # Database username
DB_PASSWORD=password # Database password
# ================================================================================
# REDIS CONFIGURATION (Optional)
# ================================================================================
REDIS_HOST=localhost # Redis server host
REDIS_PORT=6379 # Redis server port (default: 6379)
REDIS_DB=0 # Redis database number (0-15, default: 0)
# ================================================================================
# API TESTING CONFIGURATION (Optional)
# ================================================================================
API_BASE_URL=https://api.example.com
# API Authentication (configure based on your API requirements)
API_BEARER_TOKEN= # JWT/OAuth token (if needed)
API_KEY= # API key (if needed)
API_KEY_HEADER_NAME=X-API-KEY # Header name for API key (if needed)
API_USERNAME= # For login flows or basic auth
API_PASSWORD= # For login flows or basic auth
# ================================================================================
# AI-POWERED LOCATOR HEALING (Optional)
# ================================================================================
# Automatically heal broken selectors using OpenAI GPT-4
# Cost: ~$0.0003 per text-based healing, ~$0.01-0.05 per visual healing
# Note: Caching reduces costs for repeated healings
AI_HEALING_ENABLED=false # Enable AI-powered selector healing
OPENAI_API_KEY= # Get from https://platform.openai.com/api-keys
AI_MODEL=gpt-4o-mini # Model: gpt-4o-mini | gpt-4o (vision) | claude-3-sonnet
AI_CONFIDENCE_THRESHOLD=0.8 # Auto-apply healings above this confidence (0.0-1.0)
# Visual Extraction Strategy (Last Resort - Expensive!)
# Use screenshot-based AI analysis for selector healing
# WARNING: 10-100x more expensive than text-based strategies
VISUAL_EXTRACTION_ENABLED=false # Enable visual extraction (last resort only)
VISUAL_SCREENSHOT_FULL_PAGE=false # Capture full page or viewport only
VISUAL_MAX_WIDTH=1920 # Max screenshot width (larger = more expensive)
VISUAL_MAX_HEIGHT=1080 # Max screenshot height
# ================================================================================
# RETRY WRAPPER (Recommended)
# ================================================================================
# Retry failed operations before triggering expensive AI healing
# This can significantly reduce AI costs by handling transient failures
RETRY_ENABLED=true # Enable retry wrapper (recommended)
RETRY_MAX_ATTEMPTS=3 # Number of retry attempts (default: 3)
RETRY_DELAY=1.0 # Delay between retries in seconds (default: 1.0)
# ================================================================================
# ================================================================================