schemathesis-fuzzing
БесплатноБез исполняемых скриптовНе проверенUse for any request to generate API tests from an OpenAPI or GraphQL schema, or to find inputs that make an API return 500 that hand-written tests miss…
от testland★ 18 звёзд на GitHubОб этом скилле
schemathesis-fuzzing
Overview
Schemathesis is a property-based API testing tool that "automatically generates property-based tests from your OpenAPI or GraphQL schema and exercises the edge cases that break your API" (schemathesis-readme). The schema is the single source of truth - every endpoint, parameter, and response shape becomes a generator that produces hundreds of targeted variations per run.
This is complementary to example-based API testing
(postman-collections,
tavern-testing,
restassured-testing,
karate-testing) - example-based tests
verify happy paths; Schemathesis attacks the boundaries the team
forgot.
When to use
- The repo has an OpenAPI 2.0 / 3.0 / 3.1 / 3.2 spec or a GraphQL schema (June 2018+).
- The team wants automatic test coverage of new endpoints without authoring per-endpoint tests.
- Negative-scenario coverage ("what happens with a malformed request?") is missing or thin.
- A CI gate on 5xx responses (any unexpected server error) is desired.
If the API has no schema, Schemathesis cannot help - generate a schema first (FastAPI, Flask-Smorest, NestJS Swagger, dropwizard, or hand-author a spec), then return.
How to use
- Confirm the API ships an OpenAPI 2/3.x or GraphQL schema (see When to use).
- Install the CLI (
pip install schemathesis, oruvxfor a one-off run). - Run
schemathesis run <schema>against staging with the default checks; reproduce any failure from the printedcurlcommand + Hypothesis seed. - Promote it to a first-class pytest test (
@schema.parametrize()) and gate CI on schema-conformance + 5xx detection - deep CI wiring and advanced auth hooks live in references/ci-and-pytest-integration.md.
Install
pip install schemathesis
(Per schemathesis-readme.)
For the latest CLI without modifying the project's Python env:
uvx schemathesis run <schema-url>
(Adapted from schemathesis-docs - uvx is the uv runner
for one-off tool execution.)
Running via CLI
Basic invocation per schemathesis-readme:
schemathesis run <schema-url>
<schema-url> can be:
- Remote URL:
https://api.example.com/openapi.json. - Local file:
./openapi.yaml.
Key flags
Per the CLI reference (Schemathesis 4):
| Flag | Purpose |
|---|---|
-u, --url <url> |
API base URL (test against staging vs prod); required for a file-based schema. |
-c, --checks <a,b> |
Comma-separated checks to run; the default is all checks. |
-n, --max-examples <N> |
Number of generated cases per operation. |
-w, --workers <N|auto> |
Parallel workers (1-64 or auto); speeds up large schemas. |
-H, --header 'X-API-KEY: ...' |
Inject a header on every generated request (repeatable). |
-a, --auth user:pass |
HTTP Basic Auth. |
--report junit,har,vcr |
Write reports (default directory schemathesis-report); paths via --report-junit-path, --report-har-path, --report-vcr-path. |
The 3.x flags --base-url, --hypothesis-max-examples, --junit-xml
and --cassette-path are not in the current CLI (cli); old
blog posts and CI files still use them.
Worked example
schemathesis run https://api.example.com/openapi.json \
--url https://staging.example.com \
--max-examples 200 \
--workers 4 \
--header "Authorization: Bearer $API_TOKEN"
Built-in checks
Per schemathesis-readme and the [checks reference][checks], the
main checks ("All checks are enabled by default unless explicitly
disabled"; only max_response_time is off until you set
--max-response-time):
| Check | What it verifies |
|---|---|
status_code_conformance |
Response status code is one of the codes documented in the schema for that endpoint. |
response_schema_conformance |
Response body matches the documented schema (types, required fields, enum values). |
content_type_conformance |
Content-Type header is one of the schema's documented media types. |
response_headers_conformance |
Response headers conform to the schema's headers declaration. |
not_a_server_error |
The response is not in the 5xx range; any 5xx is a hard fail. |
negative_data_rejection |
Invalid input (outside the schem |
Установить schemathesis-fuzzing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл schemathesis-fuzzing?
Use for any request to generate API tests from an OpenAPI or GraphQL schema, or to find inputs that make an API return 500 that hand-written tests miss: Schemathesis fuzzes every endpoint for 5xx errors and schema violations from the CLI or pytest, picks the conformance checks and gates CI as the API evolves.
Как установить скилл schemathesis-fuzzing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл schemathesis-fuzzing запускает скрипты?
Нет, скилл состоит только из инструкций (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