gangvy 8001621972 Organize test deliverables by coursework units 3 달 전
..
reports 8001621972 Organize test deliverables by coursework units 3 달 전
README.md 8001621972 Organize test deliverables by coursework units 3 달 전
quality-rules.unit.spec.ts 2fef7b1f26 Add coursework test scripts and reports 3 달 전
run_unit_tests.ps1 8001621972 Organize test deliverables by coursework units 3 달 전

README.md

单元测试脚本

测试目标

验证后端核心业务规则是否正确,重点覆盖不依赖浏览器和外部服务的小型测试。

用例范围

模块 测试点 用例数
工单状态 合法流转、非法流转、关闭状态不可重开 8
权限隔离 客户、客服、技术支持、管理员读取权限 7
SLA 规则 截止时间、正常、预警、超时 6
附件规则 类型限制、大小限制、空文件 5

合计:26 条。

测试步骤

  1. 进入单元测试目录。
  2. 执行 run_unit_tests.ps1
  3. 脚本自动调用后端 Jest 测试文件 project/backend/tests/quality-rules.spec.ts
  4. 执行完成后查看 reports/ 下的日志和摘要。

运行命令

cd E:\软测\ServicePilot\tests\unit_tests
powershell -ExecutionPolicy Bypass -File .\run_unit_tests.ps1

验收标准

指标 标准
核心业务规则 100% 通过
单元测试整体通过率 不低于 95%
阻塞缺陷 0 个
输出证据 reports/unit_test_log.txtreports/unit_test_summary.txt