feat: 配置多环境支持
- 创建环境配置文件environments.ts - 支持development/staging/production三个环境 - 更新playwright.config.ts使用环境配置 - 创建.env.example环境变量示例 - 创建ENVIRONMENT.md环境配置指南 - 支持CI/CD集成配置
This commit is contained in:
+28
-1
@@ -1,2 +1,29 @@
|
||||
BASE_URL=http://localhost:3000
|
||||
# 测试环境配置
|
||||
# 可选值: development, staging, production
|
||||
TEST_ENV=development
|
||||
|
||||
# 基础URL(可选,会覆盖环境配置)
|
||||
# BASE_URL=http://localhost:3001
|
||||
|
||||
# API URL(可选,会覆盖环境配置)
|
||||
# API_URL=http://localhost:3001/api
|
||||
|
||||
# 浏览器配置
|
||||
HEADLESS=true
|
||||
SLOW_MO=0
|
||||
|
||||
# 测试配置
|
||||
TIMEOUT=120000
|
||||
RETRIES=0
|
||||
|
||||
# 截图和视频配置
|
||||
SCREENSHOT=only-on-failure
|
||||
VIDEO=retain-on-failure
|
||||
TRACE=retain-on-failure
|
||||
|
||||
# CI配置
|
||||
CI=false
|
||||
|
||||
# 调试配置
|
||||
DEBUG=false
|
||||
PWDEBUG=false
|
||||
|
||||
Reference in New Issue
Block a user