with one click
generate-api-test-script
生成API测试脚本
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
生成API测试脚本
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | generate-api-test-script |
| description | 生成API测试脚本 |
所有输出文件保存在 /Result 目录
rm -rf命令删除 /Result/ 目录测试脚本与一键启动命名:api-test.js
运行环境:
http 模块,启动 HTTP 服务axios请求接口,本地环境 忽略SSL验证 process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';授权与鉴权:
Mock 数据要求(非文件上传接口):
测试模式 需生成三类测试模式,并输出独立结果:
NodeJS CLI支持 : 支持在命令行中通过键盘上下键选择不同的 测试模式 选项并回车确认,测试完成后可以返回重新显示菜单
start.bat将分析的API数据按照如下参考格式组织,作为后续测试的基础数据
const apis = [
{
tag:'...',
apis:[
{
api:'...',
auth:/* true or false */,
mock:[
{ /* 根据入参字段生成 mock 数据*/ }
]
}
]
}
];