There is a pattern most Python developers know well: feature done, deadline close, test coverage zero. Then you spend as long writing tests as you spent on the feature itself.
TestForge Pro is an AST-based test skeleton generator. One command:
testforge ./src -o ./tests --report
Scans your source code and outputs ready-to-run pytest files.
What Gets Generated
For every function and class:
- Happy path tests
- Edge case stubs (null inputs, type errors, boundary values)
- Mock scaffolding for external dependencies
- Coverage analysis report
How It Works
TestForge uses Python AST module to recursively parse source files and extract function signatures, type annotations, return types, and import dependencies. Matches to test templates (CRUD, API, data processing, file handling).
Real Numbers
Tested on a 2,000-line Python project: 30 passed, 3 xfailed on first run. Time to customize: ~15 minutes. Equivalent from scratch: 1-2 hours.
One-time purchase, full source code.
本文首发于我的技术博客
Top comments (0)