{"repo":"buer2233/ai-api-test-skill","free":true,"listed":false,"github":"https://github.com/buer2233/ai-api-test-skill","clone":"git clone https://github.com/buer2233/ai-api-test-skill.git","description":"AI接口自动化测试 Skill：面向 Python + pytest + requests，驱动 Codex / Claude Code 生成、维护和调试接口用例（AI API test automation skill for Python + pytest + requests）","language":"Python","stars":129,"topics":["ai-testing","api-automation","api-testing","automated-testing","claude-code","codex","mitmproxy","pytest","python","qa-automation"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"ai-api-test-skill 简体中文 English 面向 Python + pytest + requests 接口自动化项目的 AI Skill：让 Codex / Claude Code 按固定门禁、固定流程、固定 pytest 闭环来新增和维护接口自动化用例，流程图参考：flow chart/flow.md。 它不是一个普通的提示词模板，而是一套可随仓库分发的工程化 Skill：会先校验任务信息，再按“抓包 / 参考用例 / cURL / Java Controller / pytest 报错”选择路径，最后把接口方法、接口用例和测试验证收敛到同一套规范里。 Skill特色 这个Skill更适合 没有接口文档、接口文档不规范、接口链路复杂、历史用例多的大型开发项目 。在这类项目里，直接 vibe coding 很容易漏上下文、误改文件或重复封装接口； ai-api-test-skill 的做法是把个人和团队日常编写、维护接口自动化用例的流程复刻成一套可执行的 AI 工作流，再用 Harness engineering 思路给 AI 加上明确的边界、门禁和反馈回路。 核心特色集中在 5 点： - 前置门禁约束修改边界 ：强制填写接口方法文件、接口方法位置、接口用例文件、接口用例位置和用例名，避免 AI 不知道写在哪里而大范围改动已有文件。 - 渐进式披露降低上下文噪音 ：新增、维护、抓包、参考用例、cURL、Controller、pytest 报错驱动等流程拆成子文档，按任务类型只读取必要规范。 - 真实流量驱动用例生成 ：内置抓包服务脚本，把 UI 操作产生的真实请求链路转成可分析的接口自动化输入。 - SQLite 接口资产索引 ：首次全量扫描已有接口 URL 与 method，后续增量追加；AI 可通过数据库毫秒级定位接口方法所在文件和行号，减少大量 grep 调用和 token 消耗。 - pytest 闭环验证结果 ：用例编写完成后必须执行目标 pytest，根据真实报错继续修复，直到通过或明确说明环境问题。 当前默认模板输出风格为 pytest ，可通过调整 doc/coding style guide.md 、任务门禁和用例模板来适配团队自己的接口自动化编码规范，并作为适配 unittest 、 httpx 、 aiohttp 等框架的基础。 实际编写案例记录 - 通过AI+SKILL编写自动化测试用例记录 - 通过AI+SKILL维护用例的测试记录 快速开始 详细的使用手册参考：detailedUserManual.md。 1. 准备环境 项 要求 --- --- OS Windows 10/11 Python = 3.8 测试框架 pytest HTTP 客户端 requests 抓包能力 pip install mitmproxy ，验证： mitmdump --version 第三方 Skill 建议： 用途 Skill 安装命令 --- --- --- pytest 失败修复 /test-fixing npx skills add sickn33/antigravity-awesome-skills@test-fixing -g -y Python 断点调试 /Debugging npx skills add pluginagentmarketplace/custom-plugin-python@debugging -g -y 2. 初始化配置 本 Skill 随仓库分发，通常放在项目的 .claude/sk","default_branch":null,"files":null,"tree":[],"storefront":"/r/buer2233","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/buer2233/ai-api-test-skill/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}