gangvy 2fef7b1f26 Add coursework test scripts and reports hace 3 meses
..
README.md 2fef7b1f26 Add coursework test scripts and reports hace 3 meses
api-contract.api.spec.ts 2fef7b1f26 Add coursework test scripts and reports hace 3 meses
run_api_tests.ps1 2fef7b1f26 Add coursework test scripts and reports hace 3 meses

README.md

接口测试脚本

测试目标

验证后端 Express API 的基础契约、错误响应和公开配置安全性。

用例范围

接口 测试点 预期
GET /api/health 服务健康检查 200
GET /api/config/parse 返回 Parse 前端配置结构 200
GET /api/config/parse 不暴露 masterKey/restApiKey 不存在敏感字段
GET /api/unknown-resource 未知接口 404
POST /api/ghost 404 消息包含方法与路径 404

合计:5 条。

运行命令

powershell -ExecutionPolicy Bypass -File .\run_api_tests.ps1