← 返回 Skills 市场
yang1002378395-cmyk

Api Quick Tester

作者 yang1002378395-cmyk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
180
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install api-quick-tester
功能描述
API 快速测试工具。一键测试 REST/GraphQL API,生成测试报告,模拟请求。适合前端/后端开发者。
使用说明 (SKILL.md)

API 快速测试工具

专为开发者设计。一键测试 API、生成报告、模拟请求,提升开发效率。

功能

  • 🚀 快速测试 - 一键发送 HTTP 请求
  • 📊 测试报告 - 自动生成测试报告
  • 🔄 批量测试 - 支持批量测试多个 API
  • 📝 Mock 数据 - 自动生成测试数据
  • 🔐 认证支持 - 支持 Bearer/Basic/API Key

安装

npx clawhub@latest install api-quick-tester

使用方法

1. 测试单个 API

node ~/.openclaw/skills/api-quick-tester/test.js --url "https://api.example.com/users" --method GET

输出:

📊 API 测试报告

URL: https://api.example.com/users
Method: GET
Status: 200 OK
Time: 156ms

Response:
{
  "users": [
    { "id": 1, "name": "Alice" },
    { "id": 2, "name": "Bob" }
  ]
}

✅ 测试通过

2. 批量测试

创建测试文件 api-tests.json

[
  {
    "name": "获取用户列表",
    "url": "https://api.example.com/users",
    "method": "GET",
    "expectedStatus": 200
  },
  {
    "name": "创建用户",
    "url": "https://api.example.com/users",
    "method": "POST",
    "body": { "name": "Test User" },
    "expectedStatus": 201
  }
]

运行测试:

node ~/.openclaw/skills/api-quick-tester/batch-test.js --file api-tests.json

3. Mock 数据生成

node ~/.openclaw/skills/api-quick-tester/mock.js --schema user

输出:

{
  "id": 1,
  "name": "John Doe",
  "email": "[email protected]",
  "createdAt": "2026-03-24T04:40:00Z"
}

4. GraphQL 测试

node ~/.openclaw/skills/api-quick-tester/graphql.js --url "https://api.example.com/graphql" --query '{ users { id name } }'

支持的方法

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE

认证方式

Bearer Token

node test.js --url "https://api.example.com/users" --auth bearer:YOUR_TOKEN

Basic Auth

node test.js --url "https://api.example.com/users" --auth basic:username:password

API Key

node test.js --url "https://api.example.com/users" --auth apikey:X-API-Key:YOUR_KEY

测试报告

自动生成 Markdown 测试报告:

# API 测试报告

**时间**: 2026-03-24 12:40
**总测试数**: 10
**通过**: 9
**失败**: 1

## 失败的测试

### 1. 创建用户
- URL: POST https://api.example.com/users
- 预期状态: 201
- 实际状态: 400
- 错误信息: Invalid email format

## 建议

- 检查 email 字段格式

配置

编辑 ~/.openclaw/skills/api-quick-tester/config.json

{
  "baseUrl": "https://api.example.com",
  "timeout": 5000,
  "retries": 3,
  "defaultHeaders": {
    "Content-Type": "application/json"
  }
}

💬 Pro 版本(¥199)

免费版(当前)

  • 基础 API 测试
  • 批量测试
  • 测试报告生成

Pro 版(¥199)

  • ✅ 自动化测试(CI/CD 集成)
  • ✅ 性能测试(并发/压力)
  • ✅ Mock 服务器
  • ✅ API 文档生成
  • ✅ 环境变量管理
  • ✅ 1年更新支持

联系方式

  • QQ: 1002378395(中国用户)
  • Telegram: 待注册(海外用户)

添加 QQ 1002378395,发送"API测试"获取 Pro 版信息


License

MIT(免费版) Pro 版:付费后可用

安全使用建议
This package contains two simple, readable scripts (test.js and mock.js) that do what an API quick-tester would: send requests and generate mock data. However the documentation claims additional scripts and features that are not included; that mismatch could lead an agent or user to run commands that don't exist or assume behaviors (config usage, batch/GraphQL) that aren't implemented. Before installing or running: 1) Inspect the code yourself (done above) or run it in a sandbox/isolated environment. 2) Do not pass sensitive tokens/passwords on the command line (they can be visible in process listings); prefer using safer mechanisms if you add them. 3) Be cautious following SKILL.md commands that reference missing files—ask the author for the missing scripts or a trustworthy release. 4) If you need production-grade testing (batch, CI integration, GraphQL, report files), prefer verified tools (Postman, k6, curl, existing npm packages) or require the author to provide the promised files. 5) Because the tool will send HTTP requests to any URL you provide, avoid testing it with secrets or internal endpoints you don't want contacted from an untrusted machine.
能力评估
Purpose & Capability
The skill's name and description (API testing, mock data) align with the included files: test.js implements basic HTTP requests and mock.js generates sample data. However the SKILL.md advertises extra features (batch-test, graphql testing, Markdown report generation, config-driven behavior, Pro features) that are not implemented in the provided files.
Instruction Scope
SKILL.md instructs running scripts that do not exist in the bundle (batch-test.js, graphql.js) and references a config.json under ~/.openclaw/skills/api-quick-tester which the included code does not read. The docs therefore give the agent broad, inaccurate instructions; that overreach is a sign of sloppy or misleading packaging and could confuse an automated agent into performing unexpected actions.
Install Mechanism
There is no install spec or external downloads; the skill is delivered as source files. No opaque network installs or archive extraction are present in the bundle.
Credentials
The skill requests no environment variables or credentials. It accepts authentication via CLI args (bearer/basic/apikey), which is functional but can leak secrets (command-line arguments are visible to other local users/processes). The SKILL.md also mentions 'environment variable management' as a Pro feature, but that is not implemented in the provided code.
Persistence & Privilege
always is false and the skill does not request persistent/system-wide privileges. It does not modify other skills or system config.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install api-quick-tester
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /api-quick-tester 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of API Quick Tester. - One-click testing for REST and GraphQL APIs. - Automatic generation of API test reports (including Markdown format). - Supports batch testing with test scenario files. - Built-in mock data generator and request simulation. - Supports Bearer, Basic Auth, and API Key authentication. - Includes CLI commands for rapid testing, batch testing, data mocking, and GraphQL queries.
元数据
Slug api-quick-tester
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Api Quick Tester 是什么?

API 快速测试工具。一键测试 REST/GraphQL API,生成测试报告,模拟请求。适合前端/后端开发者。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 180 次。

如何安装 Api Quick Tester?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install api-quick-tester」即可一键安装,无需额外配置。

Api Quick Tester 是免费的吗?

是的,Api Quick Tester 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Api Quick Tester 支持哪些平台?

Api Quick Tester 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Api Quick Tester?

由 yang1002378395-cmyk(@yang1002378395-cmyk)开发并维护,当前版本 v1.0.0。

💬 留言讨论