Qa Api Testing logo

Qa Api Testing

Community
Kokxi
qa-api-testing

当需要测试 RESTful/GraphQL/gRPC/WebSocket 等 API 时使用此技能。覆盖接口的功能验证、参数组合、鉴权绕过、超时重试、幂等性、接口契约和向后兼容性。不要只测 HTTP 状态码——真正的接口 Bug 往往在数据结构不一致、字段类型不匹配、空值处理和并发调用上。输出接口测试矩阵、契约断言清单和工具选型建议。 触发场景:接口测试、API测试、接口自动化、RESTful测试、GraphQL测试、gRPC测试、契约测试、接口安全测试、需要测试API时。 Use when the user asks about: API testing for REST, GraphQL, gRPC, WebSocket, SOAP, and webhook endpoints — contract validation, auth bypass, idempotency, timeout and retry behavior, and backward compatibility.

Overview

PublisherKokxi
Repositoryqa-test-skills
Skill nameqa-api-testing
Stars
39
Forks
6
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Kokxi on GitHub. Read the source before you install it.

Installation

Install the Qa Api Testing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Kokxi/qa-test-skills/tree/master/skills/qa-api-testing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kokxi/qa-test-skills.git /tmp/qa-test-skills
mkdir -p .claude/skills
cp -r /tmp/qa-test-skills/skills/qa-api-testing .claude/skills/qa-api-testing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Qa Api Testing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Qa Api Testing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Qa Api Testing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

接口测试专项

核心原则

接口 Bug 大多不在状态码,而在数据结构不一致、字段类型错配、空值处理与并发副作用。 200 只能证明"通路是通的",证明不了"数据是对的"。

1. 先定位接口类型(决定重心)

接口类型典型代表测试重点协议特点
RESTfulCRUD API、微服务接口状态码、HTTP方法语义、RESTful规范符合度无状态、资源导向、Cache
GraphQL聚合查询、数据中台查询复杂度、N+1问题、权限细粒度单一端点、按需查询
gRPC内部服务通信、高吞吐场景消息格式、流处理、超时重试Protobuf、双向流、高性能
WebSocket实时推送、消息通知连接管理、心跳、消息顺序长连接、全双工、有状态
SOAP企业级系统、金融/医疗WSDL契约验证、XML报文结构、WS-SecurityXML、强契约、RPC风格
Webhook支付回调、事件通知验签、幂等性、超时重试、回调顺序HTTP回调、被动触发、需主动Mock

2. 深度要求

复杂度用例数要求说明
简单接口接口数×5单一功能接口
中等接口接口数×10多参数接口
复杂接口接口数×15多依赖/多状态接口

必须覆盖的6个维度:

维度占比说明
功能测试40%正向/反向/边界/参数
安全测试20%认证/授权/注入
异常测试15%超时/重试/降级
性能测试10%响应时间/并发
契约测试10%接口契约验证
兼容性测试5%版本兼容

偏差声明:技能集通用六维标准为 功能/异常/边界/并发/安全/性能(见 docs/standards.md,装整套技能集时可得)。本技能针对 API 测试专项调整:将「边界」归入功能测试维(边界值验证是参数测试的子项)、将「并发」归入性能测试维(并发能力是 API 性能指标),新增「契约测试」与「兼容性测试」两维——这两者是接口测试的核心风险面(契约破裂与版本迁移),在通用功能测试中无独立维度。若与通用六维口径冲突,以本技能的六维为准,并在测试报告中说明。

小规模降级:上表占比适用于接口数 ≥ 5 的项目。接口数 < 5 时配额在数学上无法成立(20% 安全测试不足 1 条),此时改为「每维至少 1 条 + 覆盖率标注实际口径」,不要为凑比例编造用例。占比取整规则(先保 P0 所属维 → 向下取整 → 偏差 ≤1 条)见 references/core-flows.md。

3. 加载时机

需要时才读,不要一上来全读:

什么时候读读哪个
展开某一维的测试范围,或交付前逐项自检(32 项)references/core-flows.md(六维详图 + Mock 策略 + 检查清单)
生成具体测试用例;被测接口是 GraphQL/gRPC/WebSocket/SOAP/Webhookreferences/test-cases.md(39 条用例 + OWASP API Top 10 对照 + 协议专项)
选工具,或要展开某工具能力边界references/tooling.md(默认选型 + 能力矩阵 + 性能工具)
用户描述的情况命中特定风险场景references/scenarios.md(5 个场景,校正测试重心)
写用例表assets/case-template.md(9 列模板 + 填写要求)

4. 工具默认选型

没别的约束就用这套:

场景默认工具理由
日常调试与文档Postman / Apifox上手最快,协作与文档一体
自动化执行pytest + requests(Python)/ REST Assured(Java)生态成熟、易接 CI
契约测试Pact(消费者驱动)/ Schemathesis(OpenAPI 校验)前者管协作方破坏性变更,后者管实现偏离契约
第三方与异常 MockWireMock延迟/超时/脏数据开箱即用
性能k6(CI 友好);需 GUI 分布式再选 JMeter压测按需引入,非默认动作

明确"单工具全栈"诉求用 Karate。gRPC 用 grpcurl 调试(WireMock 不覆盖流式语义)。 完整能力矩阵与选型避坑见 references/tooling.md。

5. 输出格式

9 列标准表格:

用例编号测试类型功能模块测试标题用例级别预置条件测试步骤预期结果风险等级
TC_API_LOGIN_001功能测试登录接口正确凭证登录成功P0接口文档已提供,账号已就绪发送POST /api/login,参数{user,pass}返回200,响应含token且有效高
TC_API_LOGIN_002安全测试登录接口Token伪造被拒绝P0合法Token已知修改Token签名后请求受保护接口返回401,拒绝访问高
TC_API_LOGIN_003异常测试登录接口超时重试幂等性P1模拟网关超时请求超时后自动重试2次重试成功且无重复副作用中

上面 3 行只用于展示每列的写法,不是完整用例集。P0≤20% 等占比约束作用于最终交付的整份用例集, 不要照抄这 3 行的级别分布。完整模板见 assets/case-template.md。

方案产出顺序:接口类型定位 → 六维用例矩阵 → Mock 策略 → 自动化脚本设计 → 安全清单 → 风险提示。

6. 交付前自检

  • 9 列齐全,无列错位、无单元格含 |(会破坏表格与 CSV)
  • 用例编号唯一且符合 TC_{模块}_{功能}_{序号}
  • P0-P3 占比符合;接口数 <5 时已注明实际分布口径
  • 覆盖率已标注口径,无"全覆盖/100%"绝对化表述
  • 未覆盖接口已写明"未覆盖 + 原因"
  • 六维检查清单已逐项过(见 references/core-flows.md 第 8 节)

机器校验:

bash
python scripts/validate_testcase_table.py <用例文件>

覆盖列数、编号唯一性、级别/风险取值、占比、覆盖率措辞。报错先修再交付。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Qa Api Testing AI skill do?

当需要测试 RESTful/GraphQL/gRPC/WebSocket 等 API 时使用此技能。覆盖接口的功能验证、参数组合、鉴权绕过、超时重试、幂等性、接口契约和向后兼容性。不要只测 HTTP 状态码——真正的接口 Bug 往往在数据结构不一致、字段类型不匹配、空值处理和并发调用上。输出接口测试矩阵、契约断言清单和工具选型建议。 触发场景:接口测试、API测试、接口自动化、RESTful测试、GraphQL测试、gRPC测试、契约测试、接口安全测试、需要测试API时。 Use when the user asks about: API testing for REST, GraphQL, gRPC, WebSocket, SOAP, and webhook endpoints — contract validation, auth bypass, idempotency, timeout and retry behavior, and backward compatibility.

Why use Qa Api Testing on TypingMind?

Because you install it once and use it with any model. Qa Api Testing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Qa Api Testing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Kokxi/qa-test-skills/tree/master/skills/qa-api-testing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Qa Api Testing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Qa Api Testing?

As many as you like. As long as a model supports skills, you can use Qa Api Testing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Qa Api Testing AI skill free?

Yes. It is published on GitHub by Kokxi under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇