test.bat 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. @echo off
  2. REM ========================================
  3. REM 自动化回归测试 - Windows 快捷脚本
  4. REM 用法:
  5. REM test smoke - 冒烟测试 (2分钟)
  6. REM test regression - 完整回归测试 (15分钟)
  7. REM test all - 所有测试
  8. REM ========================================
  9. cd /d "%~dp0server"
  10. if "%1"=="" (
  11. echo 用法: test.bat [smoke^|regression^|all]
  12. echo.
  13. echo smoke - L1 冒烟测试(快速,约2分钟)
  14. echo regression - L2 完整回归测试(约15分钟)
  15. echo all - 运行全部测试
  16. exit /b 1
  17. )
  18. if "%1"=="smoke" (
  19. echo 🧪 运行 L1 冒烟测试...
  20. npx playwright test --project=smoke --config=tests/playwright.config.ts
  21. ) else if "%1"=="regression" (
  22. echo 🧪 运行 L2 回归测试...
  23. npx playwright test --project=regression --config=tests/playwright.config.ts
  24. ) else if "%1"=="all" (
  25. echo 🧪 运行全部测试...
  26. npx playwright test --config=tests/playwright.config.ts
  27. ) else (
  28. echo 未知参数: %1
  29. echo 用法: test.bat [smoke^|regression^|all]
  30. exit /b 1
  31. )