← 返回 Skills 市场
kaiyuelv

Api Test Automation

作者 Lv Lancer · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
364
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install api-test-automation
功能描述
API接口测试自动化工具,支持REST/GraphQL,包含接口测试、性能测试、契约测试、Mock服务等功能 | API Test Automation for REST/GraphQL with performance, contract testing and Mock services
使用说明 (SKILL.md)

API Test Automation

API接口测试自动化工具,支持REST/GraphQL,包含接口测试、性能测试、契约测试、Mock服务等功能。

概述

本Skill提供完整的API测试解决方案,支持:

  • REST API 功能测试
  • GraphQL 查询测试
  • 性能测试(并发、响应时间、吞吐量)
  • 契约测试(OpenAPI/Swagger 验证)
  • Mock 服务
  • 测试报告生成

依赖

  • Python >= 3.8
  • requests >= 2.28.0
  • httpx >= 0.24.0
  • pytest >= 7.0.0
  • pytest-asyncio >= 0.21.0
  • schemathesis >= 3.19.0
  • hypothesis >= 6.82.0
  • aiohttp >= 3.8.0
  • uvicorn >= 0.23.0
  • starlette >= 0.27.0
  • jsonschema >= 4.19.0
  • pyyaml >= 6.0
  • allure-pytest >= 2.13.0

文件结构

api-test-automation/
├── SKILL.md                  # 本文件
├── README.md                 # 使用文档
├── requirements.txt          # 依赖声明
├── examples/
│   └── run_tests.py         # 使用示例
├── tests/
│   └── test_api_suite.py    # 单元测试
└── src/
    ├── __init__.py
    ├── rest_client.py       # REST API 客户端
    ├── graphql_client.py    # GraphQL 客户端
    ├── performance.py       # 性能测试工具
    ├── contract_tester.py   # 契约测试
    ├── mock_server.py       # Mock 服务
    └── reporter.py          # 报告生成

快速开始

from api_test_automation import RestClient, GraphQLClient, PerformanceTester

# REST API 测试
client = RestClient(base_url="https://api.example.com")
response = client.get("/users")
assert response.status_code == 200

# GraphQL 测试
graphql = GraphQLClient(endpoint="https://api.example.com/graphql")
result = graphql.query("{ users { id name } }")

许可证

MIT


API Test Automation (English)

A comprehensive API testing automation tool supporting REST/GraphQL with functional testing, performance testing, contract testing, and Mock services.

Overview

This Skill provides a complete API testing solution:

  • REST API functional testing
  • GraphQL query testing
  • Performance testing (concurrency, response time, throughput)
  • Contract testing (OpenAPI/Swagger validation)
  • Mock services
  • Test report generation

Dependencies

  • Python >= 3.8
  • requests >= 2.28.0
  • httpx >= 0.24.0
  • pytest >= 7.0.0
  • pytest-asyncio >= 0.21.0
  • schemathesis >= 3.19.0
  • hypothesis >= 6.82.0
  • aiohttp >= 3.8.0
  • uvicorn >= 0.23.0
  • starlette >= 0.27.0
  • jsonschema >= 4.19.0
  • pyyaml >= 6.0
  • allure-pytest >= 2.13.0

File Structure

api-test-automation/
├── SKILL.md                  # This file
├── README.md                 # Usage documentation
├── requirements.txt          # Dependencies
├── examples/
│   └── run_tests.py         # Usage examples
├── tests/
│   └── test_api_suite.py    # Unit tests
└── src/
    ├── __init__.py
    ├── rest_client.py       # REST API client
    ├── graphql_client.py    # GraphQL client
    ├── performance.py       # Performance testing tools
    ├── contract_tester.py   # Contract testing
    ├── mock_server.py       # Mock server
    └── reporter.py          # Report generation

Quick Start

from api_test_automation import RestClient, GraphQLClient, PerformanceTester

# REST API Testing
client = RestClient(base_url="https://api.example.com")
response = client.get("/users")
assert response.status_code == 200

# GraphQL Testing
graphql = GraphQLClient(endpoint="https://api.example.com/graphql")
result = graphql.query("{ users { id name } }")

License

MIT

安全使用建议
This package appears to be a normal API testing library. Before installing or running it: 1) Install dependencies into a dedicated virtual environment (pip install -r requirements.txt). 2) Review and set any API tokens or secrets locally (examples show ${API_TOKEN}) — the skill doesn't automatically require or inject credentials. 3) Don't run performance/load tests against production endpoints without permission; they generate real load. 4) The mock server class contains a naming bug: dataclass fields and instance methods share names (e.g., 'method'/'path'), which may make fluent calls like MockRoute().method("GET") fail; either use add_json_endpoint or fix the naming collision before relying on that API. 5) Run tests in an isolated environment (sandbox/container) first and inspect generated reports (they are written to disk). If you need the skill to read environment variables automatically or to integrate with CI secrets, expect to provide those explicitly — the package itself does not request them from the platform.
功能分析
Type: OpenClaw Skill Name: api-test-automation Version: 1.0.0 The skill bundle provides a comprehensive and well-structured API testing automation suite supporting REST and GraphQL. It includes features for performance testing, OpenAPI contract validation, and a local mock server using Starlette and Uvicorn. The code follows standard practices, uses legitimate libraries (e.g., httpx, schemathesis, jinja2), and contains no evidence of malicious intent, data exfiltration, or unauthorized execution logic. All capabilities, including network access and local server hosting, are directly aligned with the tool's stated purpose.
能力评估
Purpose & Capability
The name/description (API testing for REST/GraphQL, performance, contract testing, mock services, reporting) matches the provided modules (rest_client, graphql_client, performance, contract_tester, mock_server, reporter, assertions) and the declared Python dependencies. No unrelated credentials, binaries, or system paths are requested.
Instruction Scope
SKILL.md contains only usage examples and test/run instructions appropriate for an API testing tool. One minor inconsistency: an example YAML shows ${API_TOKEN} substitution, but the skill does not declare any required environment variables; otherwise instructions do not ask to read unrelated system files or send data to unexpected endpoints.
Install Mechanism
There is no install spec in the registry (instruction-only). The bundle includes source files and a requirements.txt listing standard PyPI libraries. No downloads from arbitrary URLs or archive extraction are present in the package metadata.
Credentials
The skill declares no required environment variables, which is reasonable, but examples show usage of an API_TOKEN placeholder and the requirements include python-dotenv — a small documentation mismatch. No other sensitive environment/config access is requested.
Persistence & Privilege
The skill does not request always:true or any elevated platform persistence. It writes test reports to a local output directory (expected behavior) and does not modify other skills or global agent configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install api-test-automation
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /api-test-automation 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of API Test Automation. - Provides automated testing for REST and GraphQL APIs, including functional, performance, and contract testing. - Supports mock services and test report generation. - Includes example scripts and unit tests for easy onboarding. - Requires Python 3.8+ and several popular testing libraries (requests, httpx, pytest, etc.). - MIT licensed.
元数据
Slug api-test-automation
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Api Test Automation 是什么?

API接口测试自动化工具,支持REST/GraphQL,包含接口测试、性能测试、契约测试、Mock服务等功能 | API Test Automation for REST/GraphQL with performance, contract testing and Mock services. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 364 次。

如何安装 Api Test Automation?

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

Api Test Automation 是免费的吗?

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

Api Test Automation 支持哪些平台?

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

谁开发了 Api Test Automation?

由 Lv Lancer(@kaiyuelv)开发并维护,当前版本 v1.0.0。

💬 留言讨论