feat: configure UAT test automation and reporting
This commit is contained in:
@@ -67,6 +67,26 @@ pipeline:
|
||||
depends_on:
|
||||
- start-test-env
|
||||
|
||||
# UAT测试阶段
|
||||
uat-tests:
|
||||
image: mcr.microsoft.com/playwright:v1.58.2-jammy
|
||||
group: uat
|
||||
environment:
|
||||
TEST_BASE_URL: http://frontend-test:80
|
||||
API_BASE_URL: http://backend-test:8080
|
||||
HEADLESS_BROWSER: "true"
|
||||
CI: true
|
||||
commands:
|
||||
- cd uat-tests
|
||||
- npm ci
|
||||
- npx playwright install --with-deps chromium
|
||||
- npx playwright test --config=playwright.config.ts --reporter=json --reporter=html --reporter=junit
|
||||
- node quality-gate.js
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
depends_on:
|
||||
- start-test-env
|
||||
|
||||
# 性能测试阶段
|
||||
performance-tests:
|
||||
image: node:18-alpine
|
||||
@@ -80,6 +100,8 @@ pipeline:
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
branch: [main, develop]
|
||||
depends_on:
|
||||
- uat-tests
|
||||
|
||||
# 质量门禁检查
|
||||
quality-gate:
|
||||
@@ -119,6 +141,7 @@ pipeline:
|
||||
depends_on:
|
||||
- quality-gate
|
||||
- trend-analysis
|
||||
- uat-tests
|
||||
|
||||
# 生成测试报告
|
||||
generate-reports:
|
||||
|
||||
Reference in New Issue
Block a user