W1-W3: 基线修复与测试基础设施搭建 - 修复 Jenkins JDK 21 兼容性,统一 E2E 目录,修复 storageState 冲突 - 搭建后端测试基类 BaseContractTest + Testcontainers PostgreSQL - 创建 TestDataFactory 链式构造,完善 Vitest 基座与 Playwright fixtures - 建立 docker-compose.test.yml 与测试数据隔离方案 W4-W5: 单元测试补齐(阶段 2) - 补齐 gym-member/gym-groupCourse/gym-checkIn/gym-payment 核心模块单元测试 - 补齐 gym-coach/manage-sys 模块单元测试 - 前端 utils/composables/stores 单元测试,37 文件 502 项测试 - JaCoCo 覆盖率门禁从 30% 调整至 55%,21 模块全部通过 W6-W7: 集成与契约测试(阶段 3) - Repository 集成测试:会员/团课/签到/支付关键表,Testcontainers 100% 通过 - Handler 集成测试:WebTestClient 覆盖正向/异常/权限路径 - 网关集成测试:JWT/RBAC/签名/限流/重试 - Flyway 迁移测试:验证迁移脚本可重复执行 - OpenAPI 契约测试:覆盖 ≥80% P0 接口,202 项契约测试 0 失败 - 跨模块契约测试:会员-支付-团课数据一致性 W8-W9: E2E 与用户旅程测试(阶段 4) - 管理员 Web 核心流程 E2E:用户/角色/菜单/字典/配置 - 小程序会员端核心页面 E2E:购卡/预约/签到 - 5 条 P0 用户旅程全链路自动化,60 条 journey 测试 0 失败 W10: 变异测试与质量门禁(阶段 5) - 后端 PIT 配置:pitest-maven 1.19.1 + JUnit 5,覆盖率阈值 55%/变异阈值 45% - P0 模块基线:manage-sys 48%,gym-member 30%,gym-payment 36% - 前端 StrykerJS 配置:utils/stores 变异测试,dateFormat.ts 70.83% - Jenkins 质量门禁:JaCoCo/PIT/E2E 统一检查,不达标阻断构建 W11: 持续运行与改进(阶段 6) - 测试指标收集脚本 scripts/collect-test-metrics.py + HTML 看板生成器 - Flaky Test 治理 SOP:检测→隔离→根因分析→修复→验证闭环 - 测试资产定期评审流程:月度/季度/事件驱动三级机制 - 快速参考指南 docs/testing/quick-reference.md - 累计 10 份测试文档,7 个里程碑全部达成
76 lines
2.7 KiB
JSON
76 lines
2.7 KiB
JSON
{
|
|
"name": "gym-manage-web",
|
|
"version": "1.0.0",
|
|
"description": "Gym Management System Frontend",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"dev:local": "vite --mode development-local",
|
|
"dev:test": "vite --mode test",
|
|
"build": "vue-tsc && vite build",
|
|
"build:test": "vue-tsc && vite build --mode test",
|
|
"build:prod": "vue-tsc && vite build --mode production",
|
|
"preview": "vite preview",
|
|
"test": "vitest --run",
|
|
"test:ui": "vitest --ui",
|
|
"test:unit": "vitest --run --coverage",
|
|
"test:coverage": "vitest --run --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:smoke": "playwright test --project=smoke",
|
|
"test:e2e:journeys": "playwright test --project=journeys",
|
|
"test:e2e:headed": "playwright test --headed",
|
|
"test:e2e:debug": "playwright test --debug",
|
|
"test:e2e:perf": "node scripts/measure-e2e-performance.js",
|
|
"test:perf": "node scripts/performance-test.js performance",
|
|
"test:load": "node scripts/performance-test.js load",
|
|
"test:perf:all": "node scripts/performance-test.js all",
|
|
"test:edge": "playwright test edge-cases.spec.ts",
|
|
"test:performance-opt": "playwright test performance-optimization.spec.ts",
|
|
"test:parallel-opt": "playwright test parallel-optimization.spec.ts",
|
|
"test:all-opt": "playwright test edge-cases.spec.ts performance-optimization.spec.ts parallel-optimization.spec.ts",
|
|
"test:monitor": "node e2e/performanceMonitor.js report",
|
|
"test:mutation": "stryker run",
|
|
"type-check": "vue-tsc --noEmit",
|
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx --fix --ignore-path .gitignore",
|
|
"format": "prettier --write src/"
|
|
},
|
|
"dependencies": {
|
|
"@element-plus/icons-vue": "^2.3.2",
|
|
"axios": "^1.6.2",
|
|
"crypto-js": "^4.2.0",
|
|
"date-fns": "^4.1.0",
|
|
"dayjs": "^1.11.10",
|
|
"element-plus": "^2.13.5",
|
|
"jwt-decode": "^4.0.0",
|
|
"pinia": "^3.0.4",
|
|
"vue": "^3.5.26",
|
|
"vue-i18n": "^9.8.0",
|
|
"vue-router": "^4.6.4"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.40.1",
|
|
"@stryker-mutator/core": "^9.6.1",
|
|
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
"@types/crypto-js": "^4.2.2",
|
|
"@types/node": "^20.10.0",
|
|
"@types/pg": "^8.20.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
"@typescript-eslint/parser": "^6.18.1",
|
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
"@vitest/coverage-v8": "^4.1.1",
|
|
"@vitest/ui": "^4.0.16",
|
|
"@vue/test-utils": "^2.4.3",
|
|
"allure-playwright": "^3.10.2",
|
|
"eslint": "^8.56.0",
|
|
"eslint-plugin-vue": "^9.19.2",
|
|
"jsdom": "^27.4.0",
|
|
"pg": "^8.22.0",
|
|
"prettier": "^3.1.1",
|
|
"terser": "^5.46.1",
|
|
"typescript": "^5.9.3",
|
|
"vite": "^7.3.1",
|
|
"vitest": "^4.0.16",
|
|
"vue-tsc": "^3.2.2"
|
|
}
|
|
}
|