Install
openclaw skills install skylv-api-testerAPI测试助手。测试REST API接口,验证响应、生成测试报告。使用场景:(1) 测试API接口可用性,(2) 验证响应格式和数据,(3) 性能测试,(4) 生成API文档。
openclaw skills install skylv-api-tester测试和验证REST API接口。
用户: 测试 GET https://api.example.com/users
执行步骤:
用户: 测试以下API:
POST https://api.example.com/users
Headers: Content-Type: application/json
Body: {"name": "test", "email": "test@example.com"}
执行步骤:
用户: 批量测试以下接口列表:
1. GET /users
2. GET /users/1
3. POST /users
4. PUT /users/1
5. DELETE /users/1
执行步骤:
用户: 对 GET /api/data 进行性能测试,发送100次请求
执行步骤:
API 测试报告
接口: GET https://api.example.com/users
时间: 2026-04-06 10:00:00
请求信息:
- 方法: GET
- URL: https://api.example.com/users
- Headers: Authorization: Bearer xxx
响应信息:
- 状态码: 200 OK ✓
- 响应时间: 156ms
- 响应大小: 2.3KB
响应体验证:
✓ status 字段存在
✓ data 字段为数组
✓ data 包含 25 条记录
✓ 每条记录包含 id, name, email
性能指标:
- 平均: 156ms
- 最小: 98ms
- 最大: 312ms
- P95: 245ms
结论: 测试通过 ✓