Skip to content

api-evangelist/schemathesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schemathesis

Schemathesis is a property-based API testing tool that automatically generates test cases from OpenAPI and GraphQL schemas to find bugs and specification violations. It uses the Hypothesis property-based testing framework to generate diverse, edge-case-covering test inputs from schema constraints, detecting server crashes, response schema violations, validation bypasses, and stateful bugs in multi-step workflows.

Used by Netflix, SAP, Red Hat, IBM, and JetBrains.

Human URL: https://schemathesis.io

Resources

Features

  • Property-Based Testing — Generates thousands of test cases automatically from schema type constraints, format rules, enums, and patterns
  • Schema-Driven Fuzzing — Inputs are constrained by schema definitions for targeted, meaningful fuzzing
  • Response Validation — Checks status codes, response bodies, content types, and headers against OpenAPI declarations
  • Stateful Testing — Follows OpenAPI Links to generate multi-step workflow tests
  • Automatic Shrinking — Minimizes failing cases to smallest reproducible curl command
  • CI/CD Native — GitHub Actions (schemathesis/action@v2), GitLab CI, pytest integration

Supported Specifications

  • OpenAPI 2.0 (Swagger), 3.0.x, 3.1.x
  • GraphQL schemas (SDL and introspection)

Installation

pip install schemathesis
# or
uvx schemathesis run schema.json --url https://api.example.com

Artifacts

JSON Schema

JSON Structure

JSON-LD

Examples

Vocabulary

Maintainers

Kin Lanekin@apievangelist.com

About

Schemathesis is a property-based API testing tool that automatically generates test cases from OpenAPI and GraphQL schemas to find bugs and specification violations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors