Skip to content

httrace-io/httrace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Httrace

Capture real production HTTP traffic. Auto-generate integration tests.

PyPI License: MIT CI

pip install httrace

How it works

  1. Install — add one line of middleware to your app
  2. Capture — real HTTP traffic is captured and sanitized in the background
  3. Generatehttrace generate writes pytest files directly into your repo

Quickstart

# FastAPI / Starlette
from httrace import HttraceCaptureMiddleware

app.add_middleware(
    HttraceCaptureMiddleware,
    api_key="ht_your_key_here",
    service="my-api",
)
# Flask / Django (WSGI)
from httrace import HttraceCaptureMiddleware

app = HttraceCaptureMiddleware(app, api_key="ht_your_key_here", service="my-api")

Then generate tests:

httrace init       # creates httrace.config.yaml
httrace generate   # writes pytest files to tests/integration/
httrace status     # shows endpoint coverage

Features

  • Zero latency impact — fire-and-forget background queue
  • Automatic PII sanitization (JWT, email, credit card, IBAN, phone, UUIDs)
  • Deduplication — same endpoint shape captured once
  • Session chain analysis — detects request dependencies
  • Fixture inference — generates pytest setUp helpers from request bodies

Documentation

License

MIT — see LICENSE.
The Httrace backend and test generation service are proprietary.

About

Capture real production HTTP traffic and auto-generate integration tests. pip install httrace

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors