|
|
3 ヶ月 前 | |
|---|---|---|
| .. | ||
| api_tests | 3 ヶ月 前 | |
| auto_tests | 3 ヶ月 前 | |
| performance_tests | 3 ヶ月 前 | |
| unit_tests | 3 ヶ月 前 | |
| README.md | 3 ヶ月 前 | |
| 测试结果汇总.md | 3 ヶ月 前 | |
本目录按课程作业要求拆分为四类测试脚本:
tests/
├─ unit_tests/ # 单元测试脚本
├─ api_tests/ # 接口测试脚本
├─ auto_tests/ # 自动化测试脚本
└─ performance_tests/ # Locust 性能测试脚本
位置:tests/unit_tests
覆盖内容:
运行命令:
cd E:\软测\ServicePilot\tests\unit_tests
powershell -ExecutionPolicy Bypass -File .\run_unit_tests.ps1
位置:tests/api_tests
覆盖内容:
/api/health/api/config/parse运行命令:
cd E:\软测\ServicePilot\tests\api_tests
powershell -ExecutionPolicy Bypass -File .\run_api_tests.ps1
位置:tests/auto_tests
覆盖内容:
运行前先启动前端或静态预览:
cd E:\软测\ServicePilot\project\frontend
npm.cmd run build
D:\nodejs\node.exe scripts\static-preview.cjs
再执行:
cd E:\软测\ServicePilot\tests\auto_tests
powershell -ExecutionPolicy Bypass -File .\run_auto_tests.ps1
位置:tests/performance_tests
覆盖内容:
需要安装 Locust:
pip install locust
运行后端接口性能测试:
cd E:\软测\ServicePilot\tests\performance_tests
powershell -ExecutionPolicy Bypass -File .\run_backend_performance.ps1
运行前端页面性能测试:
cd E:\软测\ServicePilot\tests\performance_tests
powershell -ExecutionPolicy Bypass -File .\run_frontend_performance.ps1