gangvy 8001621972 Organize test deliverables by coursework units há 3 meses atrás
..
artifacts 8001621972 Organize test deliverables by coursework units há 3 meses atrás
reports 8001621972 Organize test deliverables by coursework units há 3 meses atrás
README.md 8001621972 Organize test deliverables by coursework units há 3 meses atrás
run_auto_tests.ps1 8001621972 Organize test deliverables by coursework units há 3 meses atrás
servicepilot-ui-flow.ps1 2fef7b1f26 Add coursework test scripts and reports há 3 meses atrás

README.md

自动化测试脚本

测试目标

使用 Playwright CLI 进行浏览器自动化测试,验证前端关键页面能够访问、页面标题存在、没有明显路由空白,并为每个页面保存截图。

覆盖流程

编号 页面 验证点
AUTO-001 /dashboard 工作台标题与核心指标可见
AUTO-002 /tickets 工单管理工作台可见
AUTO-003 /sla SLA 管理页面可见
AUTO-004 /knowledge 知识库页面可见
AUTO-005 /files 附件管理页面可见
AUTO-006 /reviews 满意度评价页面可见
AUTO-007 /test-plan 测试计划页面可见

运行命令

先启动前端静态预览:

cd E:\软测\ServicePilot\project\frontend
npm.cmd run build
D:\nodejs\node.exe scripts\static-preview.cjs

再运行:

powershell -ExecutionPolicy Bypass -File .\run_auto_tests.ps1

验收标准

指标 标准
页面 HTTP 状态 200
覆盖页面数量 7 个
页面截图 每个页面生成 1 张 PNG
截图文件大小 大于 10KB
自动化流程通过率 100%

输出证据

tests/auto_tests/reports/auto_test_log.txt
tests/auto_tests/reports/auto_test_summary.txt
tests/auto_tests/artifacts/