API 批量测试与性能报告工具
- 单接口快速测试
- 批量测试(从配置文件加载)
- 重复测试(压力测试)
- 响应时间统计
- 自动生成 JSON/Markdown/CSV 报告
# 测试单个 API
python api_tester.py --url https://api.example.com/users --method GET
# 批量测试
python api_tester.py --config tests.json
# 压力测试(重复 10 次)
python api_tester.py --url https://api.example.com/data --iterations 10{
"tests": [
{
"name": "获取用户列表",
"url": "https://api.example.com/users",
"method": "GET",
"headers": {"Authorization": "Bearer YOUR_TOKEN"}
},
{
"name": "创建用户",
"url": "https://api.example.com/users",
"method": "POST",
"data": {"name": "test", "email": "test@example.com"}
}
]
}需要 API 测试服务?
- 单接口测试:¥200
- 全套测试 + 报告:¥800-2000
- 自动化测试集成:¥3000+