Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计通过

my-api-test-automationMY API 测试自动化

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

2,889

周安装

118

GitHub Stars

公开资料未说明

下载量

935
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:my-api-test-automation(MY API 测试自动化)
来源仓库:https://github.com/huahuaweiwei/my-api-test-automation
安装命令:
openclaw skills install my-api-test-automation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install my-api-test-automation

简介

从接口文档自动生成标准化 API 测试用例,支持 OpenAPI、Postman 等格式输入。

  • 适用于前后端联调、服务集成验证和接口规范检查等开发环节。
  • 可输出请求结构、字段命名建议和错误码整理,提升接口设计质量。
  • 使用时应基于真实业务语义,避免凭空补全字段或忽略鉴权、分页等关键规则。
  • 涉及代码生成时需配合现有 schema 或样例数据,防止引入错误逻辑。

SKILL.md

name
api-test-automation
description
Generate complete automated API test cases from interface documentation such as OpenAPI, Swagger exports, Postman collections, Markdown API docs, or endpoint tables. Use when Codex needs to analyze interface docs, generate executable API test cases, add configurable pre-request scripts and post-response assertion scripts, adapt the suite to a user-provided runtime environment, execute the generated tests, and produce a complete test report with pass/fail details, diagnostics, and environment summary.

API Test Automation

Overview

Use this skill to turn API or interface documentation into an executable automated test suite. Always carry the work through end-to-end: understand the API spec, generate complete test cases, wire pre-request and post-assertion logic, execute the suite in the requested environment, and emit a complete report.

Workflow

  1. Identify the input artifacts.
  2. Normalize the execution environment.
  3. Generate the test workspace and test cases.
  4. Add pre-request scripts and post-response assertion scripts.
  5. Execute the suite in the requested environment.
  6. Produce the report and call out gaps or assumptions.

Step 1: Identify the Input Artifacts

Accept any of these as the source of truth:

  • OpenAPI or Swagger JSON or YAML
  • Postman collection or environment exports
  • Markdown, Word, PDF, spreadsheet, or plain-text API documentation
  • Tables that describe endpoints, methods, headers, parameters, request bodies, and expected responses

Before generating tests, extract at least:

  • base URL or environment-specific host mapping
  • authentication mechanism
  • endpoint path and HTTP method
  • request parameters, headers, and body schema
  • expected status codes and business assertions
  • setup or dependency relationships between endpoints

If the documentation is partial, continue by making explicit assumptions and record them in the final report.

Step 2: Normalize the Execution Environment

Read environment-contract.md when the user provides runtime or environment details or asks to execute the generated suite.

Capture these items before execution:

  • runner choice: postman, newman, pytest, or another user-mandated runner
  • base URL and environment name
  • auth secrets or auth injection method
  • common headers and variables
  • setup or teardown hooks
  • report output path

Prefer these execution strategies:

  • Use newman when the user environment already relies on Postman collections or JavaScript test scripts.
  • Use pytest plus requests when the user wants Python-based suites or the environment clearly supports Python better.
  • Follow the user-required runner if they specify one.

Step 3: Generate the Test Workspace and Cases

Run scripts/prepare_test_workspace.py to create a stable workspace skeleton before filling in test logic.

Example:

python scripts/prepare_test_workspace.py --output C:\work\api-test-output --runner postman --env-name sit

Then populate the generated workspace with:

  • endpoint-by-endpoint happy-path cases
  • validation and error cases for required fields, data types, bounds, and permissions
  • dependency-chain cases for create, query, update, delete, or equivalent flows
  • data-driven variants when the documentation exposes enumerations or boundary values

Always create or update case-manifest.json so the report stage can map results back to endpoints and coverage.

Step 4: Add Pre-request and Post-assertion Logic

Use templates from assets/templates/ when you need a quick starting point.

Pre-request logic should handle things like:

  • auth token acquisition and refresh
  • timestamp or signature generation
  • shared headers or trace IDs
  • setup requests and variable extraction

Post-response assertion logic should validate both transport and business semantics:

  • HTTP status code
  • response time or basic performance budget when required
  • required fields and schema fragments
  • business codes or messages
  • cross-step state propagation

Keep environment-sensitive values in config or env files rather than hard-coding them into each case.

Step 5: Execute the Suite

If the user asks to run the suite, execute it in the provided environment after confirming the runner and prerequisites from the available local context.

Execution checklist:

  • verify required CLI or runtime exists (newman, node, python, pytest, and so on)
  • inject environment variables or environment files
  • run the generated suite from the generated workspace
  • capture raw stdout or stderr and machine-readable result artifacts when possible
  • do not silently skip failed setup steps; report them

If the environment is missing a dependency, report the exact blocker and, when appropriate, suggest the minimal install command.

Step 6: Produce the Report

Run scripts/build_test_report.py after execution to generate a human-readable summary and machine-readable JSON report.

Example:

python scripts/build_test_report.py --manifest C:\work\api-test-output\case-manifest.json --results-dir C:\work\api-test-output\
eports --output-md C:\work\api-test-output\
eports\	est-report.md --output-json C:\work\api-test-output\
eports\	est-report.json

The final report should include:

  • environment summary
  • source artifacts used
  • generated suite summary
  • total, passed, failed, and skipped counts
  • per-case failure details
  • endpoint coverage or uncovered items
  • assumptions, blockers, and follow-up recommendations

Resources

scripts/prepare_test_workspace.py

Create a reusable output skeleton with config, report, and script directories plus a starter case-manifest.json.

scripts/build_test_report.py

Merge execution artifacts into a complete Markdown and JSON report.

references/environment-contract.md

Read when runtime or environment details are provided or when deciding how to execute the generated tests.

references/report-contract.md

Read when you need the expected report sections or result-file shape.

assets/templates/

Use starter templates for environment config, pre-request script, post-assertion script, and test-plan notes. Copy and adapt them instead of re-creating boilerplate.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

86.36%
按下载量换算807

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills