Install
openclaw skills install @kingaiwork/api-test-genGenerate API tests from OpenAPI spec with assertions. / 从 OpenAPI 规范生成带断言的 API 测试。
openclaw skills install @kingaiwork/api-test-genGenerate API tests from OpenAPI spec with assertions. / 从 OpenAPI 规范生成带断言的 API 测试。
• Generates complete test suites from any OpenAPI 3.x spec / 从任意 OpenAPI 3.x 规范一键生成完整测试套件,覆盖边缘情况与主流程 • Smart assertions for status codes, response body shape, and error handling / 智能断言引擎,自动校验状态码、响应结构及异常处理,让测试更可靠 • Supports multiple frameworks: pytest, Jest, Postman collection / 原生支持 pytest、Jest 与 Postman 集合,无缝融入现有工作流 • Built-in schema validation detects breaking API changes instantly / 内置 Schema 校验,秒级发现 API 破坏性变更,避免上线事故 • [Pro] Auto-generates realistic mock data using response schema / [Pro] 基于响应 Schema 自动生成逼真的 Mock 数据,解放手写样本的繁琐 • [Pro] Monitors your live API and updates tests when spec changes / [Pro] 实时监控线上 API,Spec 变动时自动更新测试,永不滞后
# Step 1 — check environment
which bash curl && echo "Ready"
# Step 2 — run the tool
api-test-gen generate petstore.yaml --framework pytest --assertions all This generates a full pytest test suite for the Petstore API with every assertion type enabled. / 基于 Petstore 规范生成全套 pytest 测试,开启所有断言类型。
# Step 3 — review output
echo "Done — check the generated output"
• You update an API endpoint and want to ensure existing clients still work. Use api-test-gen to regenerate tests and catch regressions. / 你更新了某个 API 端点,担心影响旧客户端,使用本工具重新生成测试,快速捕获回归问题。 • Your team needs to onboard a new developer to a complex API. Generate comprehensive tests as living documentation. / 团队新成员需要理解复杂 API,生成测试用例作为可执行文档,学习成本直降。 • You deploy a service with an OpenAPI spec and want CI to validate every change. Integrate generated tests into your pipeline. / 部署带 OpenAPI 规范的服务后,希望在 CI 中自动验证每次变更,只需将生成测试集成到流水线。
| Capability | Free | Pro |
|---|---|---|
| Basics / 基础 | ✅ | ✅ |
| Automation / 自动化 | — | ✅ |
| AI / AI 功能 | — | ✅ |
| Support | Community | Priority |
Need more power? Full version at https://kingai.work/
🖥️ RackNerd — 1GB KVM VPS / 高性能äºæå¡å¨ https://my.racknerd.com/aff.php?aff=20179&pid=952
📈 moomoo — Stocks & Crypto Trading Up to $1,000 bonus / 最高 $1,000 奖励 https://j.moomoo.com/0CrlDz