api-testing
БесплатноБез исполняемых скриптовНе проверенUse for testing HTTP endpoints directly using cross-platform API testing tools. Covers .http files (VS Code REST Client, JetBrains HTTP Client), Bruno…
от onfire7777★ 17 звёзд на GitHubОб этом скилле
API Testing
Overview
API testing verifies HTTP endpoints directly without a browser or UI layer. It validates request/response contracts, status codes, headers, payloads, authentication, and error handling at the transport level. API tests are faster than E2E tests and provide high confidence that your services behave correctly.
Cross-Platform Tools
| Tool | Type | Strengths |
|---|---|---|
| .http files | VS Code REST Client / JetBrains HTTP Client | Version-controlled, inline in IDE, variable support |
| Bruno | Desktop + CLI | Git-friendly .bru collections, open source, no cloud sync required |
| Postman / Newman | Desktop + CLI | Rich GUI, team collaboration, extensive scripting, CI via Newman |
| k6 | CLI (JavaScript) | Scripted API tests with checks and thresholds, doubles as load tool |
| REST Client (VS Code) | VS Code extension | Lightweight, .http/.rest files, inline responses |
.http Files (VS Code REST Client / JetBrains HTTP Client)
Syntax Overview
The .http file format is supported by both VS Code REST Client and JetBrains HTTP Client with minor differences. Requests are separated by ###.
Example: requests.http
### Variables
@baseUrl = https://api.example.com
@authToken = Bearer {{$dotenv AUTH_TOKEN}}
### GET — List users
GET {{baseUrl}}/users?page=1&limit=10
Authorization: {{authToken}}
Accept: application/json
### POST — Create a user
POST {{baseUrl}}/users
Authorization: {{authToken}}
Content-Type: application/json
{
"name": "Jane Doe",
"email": "[email protected]",
"role": "admin"
}
### PUT — Update user
PUT {{baseUrl}}/users/42
Authorization: {{authToken}}
Content-Type: application/json
{
"name": "Jane Smith"
}
### DELETE — Remove user
DELETE {{baseUrl}}/users/42
Authorization: {{authToken}}
Environment Files
Create environment-specific variable files for VS Code REST Client:
// .vscode/settings.json
{
"rest-client.environmentVariables": {
"$shared": {
"version": "v1"
},
"development": {
"baseUrl": "http://localhost:3000",
"authToken": "dev-token-123"
},
"staging": {
"baseUrl": "https://staging-api.example.com",
"authToken": "staging-token-456"
},
"production": {
"baseUrl": "https://api.example.com",
"authToken": "prod-token-789"
}
}
}
JetBrains HTTP Client Environment
// http-client.env.json
{
"development": {
"baseUrl": "http://localhost:3000",
"authToken": "dev-token-123"
},
"staging": {
"baseUrl": "https://staging-api.example.com",
"authToken": "staging-token-456"
}
}
// http-client.private.env.json (gitignored — secrets go here)
{
"development": {
"authToken": "real-dev-secret"
}
}
Bruno
Overview
Bruno is an open-source, git-friendly API client. Collections are stored as plain-text .bru files that can be version-controlled alongside your code.
Example: .bru File Format
// collection/users/get-users.bru
meta {
name: Get Users
type: http
seq: 1
}
get {
url: {{baseUrl}}/users?page=1&limit=10
body: none
auth: bearer
}
auth:bearer {
token: {{authToken}}
}
headers {
Accept: application/json
}
assert {
res.status: eq 200
res.body.length: gt 0
}
script:post-response {
const data = res.getBody();
bru.setVar("firstUserId", data[0].id);
}
// collection/users/create-user.bru
meta {
name: Create User
type: http
seq: 2
}
post {
url: {{baseUrl}}/users
body: json
auth: bearer
}
auth:bearer {
token: {{authToken}}
}
body:json {
{
"name": "Jane Doe",
"email": "[email protected]",
"role": "admin"
}
}
assert {
res.status: eq 201
res.body.name: eq "Jane Doe"
}
Bruno Environment Files
// environments/development.bru
vars {
baseUrl: http://localhost:3000
authToken: dev-token-123
}
// environments/staging.bru
vars {
baseUrl: https://staging-api.example.com
authToken: staging-token-456
}
Bruno CLI Runner (CI Integration)
# Install Bruno CLI
npm install -g @usebruno/cli
# Run entire collection
bru run --env development
# Run specific folder
bru run collection/users --env staging
# Output JUnit report for CI
bru run --env staging --output results.xml --format junit
Postman / Newman
Collection Structure
Postman collections are JSON files containing organized API requests with folders, variables, and test scripts.
Pre-Request Scripts
// Pre-request script — generate dynamic data
const timestamp = Date.now();
pm.variables.set("requestId", `req-${timestamp}`);
// Chain authentication
if (!pm.environment.get("accessToken")) {
pm.sendRequest({
url: pm.environment.get("authUrl") + "/token",
method: "POST",
header: { "Content-Type": "app
Установить api-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл api-testing?
Use for testing HTTP endpoints directly using cross-platform API testing tools. Covers .http files (VS Code REST Client, JetBrains HTTP Client), Bruno collections, Postman/Newman, k6 for functional API verification, environment management, and CI integration patterns. USE FOR: .http files, Bruno, Postman, Newman, REST Client, k6 API tests, HTTP endpoint testing, API collections, environment variables, API functional verification, HTTP request scripting, API test automation DO NOT USE FOR: browser-based testing (use e2e-testing), contract verification between services (use contract-testing), load/stress testing at scale (use performance-testing)
Как установить скилл api-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic