Skip to main content

TraceCov

Shows which parts of your OpenAPI spec your tests never exercise: operations, parameters, schema keywords, responses.

Your API tests pass. But did you actually test the validation rules?

Hitting POST /users with {"name": "Alice", "age": 30} gives you 100% endpoint coverage—but you haven't tested empty names, negative ages, or strings that are too long.

TraceCov measures coverage at the schema keyword level: minLength, pattern, enum, minimum - not just endpoints.

API Coverage Report

Install

pip install tracecov

Quick Start

Record two requests to the public Petstore API (needs requests):

import requests
import tracecov

spec = requests.get("https://petstore3.swagger.io/api/v3/openapi.json").json()
coverage = tracecov.CoverageMap.from_dict(spec)
session = coverage.requests.track_session(requests.Session())

pet = {"id": 123456, "name": "fluffy", "photoUrls": [], "status": "available"}
session.post("https://petstore3.swagger.io/api/v3/pet", json=pet)
session.get("https://petstore3.swagger.io/api/v3/pet/123456")

coverage.save_report()  # writes coverage.html

Your test suite works the same way: send its requests through the tracked session.

What It Tracks

Dimension What it measures
Operations HTTP method + path combinations called
Parameters Path, query, header, cookie, body coverage
Keywords JSON Schema validation rules (minLength, pattern, etc.)
Examples Schema examples and defaults used
Responses HTTP status codes returned

Documentation

https://docs.tracecov.sh/

Feedback

Questions and ideas: GitHub Discussions. Bugs: GitHub Issues.

Professional Edition

For advanced features, contact info@tracecov.sh.

Metadata

Release files for tracecov 0.26.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracecov 0.26.2
File Size Uploaded Provenance Actions
tracecov-0.26.2.tar.gz 23.8 kB Without provenance Details for tracecov-0.26.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tracecov 0.26.2
File Interpreter ABI Platform Actions
tracecov-0.26.2-py3-none-any.whl Python 3 none any Details for tracecov-0.26.2-py3-none-any.whl

Total release size: 53.1 kB

Release files / tracecov-0.26.2.tar.gz

Download URL tracecov-0.26.2.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
91e0e2c335f240d177d1d6046754bd4a8a21bb815065724499567eebd738770b
BLAKE2b-256 checksum
How to use checksums
642b9e361b042310ee4c8cdfbd0dc6b9dd5a6be9b5f0d507f3454a366bdee178
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tracecov-0.26.2-py3-none-any.whl

Download URL tracecov-0.26.2-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bff66c9fa4f726d5c393b3e6f125c8febfa9af839955b94fe20a9b79ffee814
BLAKE2b-256 checksum
How to use checksums
4829eb6c12e55fde4aa1e85b1bcc6bb0efbc2f1a82b6b8b69b087c658462d9e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for tracecov 0.26.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.26.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page