Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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
Полный SKILL.md на GitHub

Установить api-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdREADME.mdmetadata.jsonrules/_sections.mdrules/_template.mdrules/api-testing-assert-on-response-structure-not-just-status-codes.mdrules/api-testing-centralize-environment-configuration-in-one-place-and.mdrules/api-testing-commit-bru-files-directly-to-git.mdrules/api-testing-document-which-environments-are-safe-for-write-operations.mdrules/api-testing-export-collections-as-v2.mdrules/api-testing-group-related-requests-with-group-for-organized-output.mdrules/api-testing-keep-http-files-next-to-the-api-code-they-test-for-easy.mdrules/api-testing-maintain-parallel-environment-configs-for-dev-staging-and.mdrules/api-testing-never-commit-secrets.mdrules/api-testing-prefer-bruno-over-postman-when-you-need-offline-git-native.mdrules/api-testing-run-newman-in-ci-with-bail-to-fail-fast-on-errors.mdrules/api-testing-test-error-cases.mdrules/api-testing-use-check-for-assertions-and-thresholds-for-pass-fail.mdrules/api-testing-use-collection-level-variables-for-values-shared-across.mdrules/api-testing-use-dotenv-var-for-secrets-to-avoid-hardcoding-tokens.mdrules/api-testing-use-env-for-environment-specific-configuration.mdrules/api-testing-use-environment-files-to-separate-configuration-from-test.mdrules/api-testing-use-pm-test-in-post-response-scripts-for-assertions.mdrules/api-testing-use-read-only-smoke-test-only-policies-for-production.mdrules/api-testing-use-script.mdrules/api-testing-use-separators-to-organize-requests-logically-in-a.mdrules/api-testing-use-the-assert-block-for-inline-response-validation.mdrules/api-testing-use-variable-declarations-at-the-top-for-shared-values.mdrules/api-testing-use-vus-1-iterations.mdrules/api-testing-version-control-your-api-test-collections-alongside-the.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить api-testing с