api-testing
仓库创建 2025年11月8日最近提交 29 天前SkillHot 收录 22 天前
▸ 精选理由
便于快速搭建自动化接口测试与集成流水线,覆盖常见场景。
这个 Skill 做什么
为 JS/TS 与 Python 提供 API 测试范例与最佳实践(Supertest/httpx/pytest)。
提供一套可复制的 API 测试示例和最佳实践:TypeScript 用 Supertest,Python 用 httpx+pytest,覆盖 REST、GraphQL、鉴权、请求/响应校验和异常场景。适合在本地或 CI 流水线中构建自动化测试,让边界条件、重放和错误处理都有稳定的用例。
▸ 展开 SKILL.md 英文原文
HTTP API testing for TypeScript (Supertest) and Python (httpx, pytest). Test REST APIs, GraphQL, request/response validation, authentication, and error handling.
180
Stars
28
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/secondsky/claude-skills/main/plugins/api-testing/skills/api-testing/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/secondsky/claude-skills/main/plugins/api-testing/skills/api-testing/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# API Testing
Expert knowledge for testing HTTP APIs with Supertest (TypeScript/JavaScript) and httpx/pytest (Python).
## TypeScript/JavaScript (Supertest)
### Installation
```bash
# Using Bun
bun add -d supertest @types/supertest
# or: npm install -D supertest @types/supertest
```
### Basic Setup
```typescript
import { describe, it, expect } from 'vitest'
import request from 'supertest'
import { app } from './app'
describe('API Tests', () => {
it('returns health status', async () => {
const response = await request(app)
.get('/api/health')
.expect(200)
expect(response.body).toEqual({ status: 'ok' })
})
it('creates a user', async () => {
const responsevia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有