@echo off REM ======================================== REM 自动化回归测试 - Windows 快捷脚本 REM 用法: REM test smoke - 冒烟测试 (2分钟) REM test regression - 完整回归测试 (15分钟) REM test all - 所有测试 REM ======================================== cd /d "%~dp0server" if "%1"=="" ( echo 用法: test.bat [smoke^|regression^|all] echo. echo smoke - L1 冒烟测试(快速,约2分钟) echo regression - L2 完整回归测试(约15分钟) echo all - 运行全部测试 exit /b 1 ) if "%1"=="smoke" ( echo 🧪 运行 L1 冒烟测试... npx playwright test --project=smoke --config=tests/playwright.config.ts ) else if "%1"=="regression" ( echo 🧪 运行 L2 回归测试... npx playwright test --project=regression --config=tests/playwright.config.ts ) else if "%1"=="all" ( echo 🧪 运行全部测试... npx playwright test --config=tests/playwright.config.ts ) else ( echo 未知参数: %1 echo 用法: test.bat [smoke^|regression^|all] exit /b 1 )