FlaskAppTest
FlaskAppTest is a production-grade, AST-based Flask API testing CLI.
It allows developers and QA engineers to scan Flask projects, detect endpoints, generate payloads, run interactive manual tests, execute batch tests, and integrate easily into CI/CD pipelines.
Features
- ✅ Detect Flask applications automatically via AST analysis
- ✅ Extract Flask endpoints and their HTTP methods
- ✅ Generate request payload templates (path, query, body parameters)
- ✅ Run interactive manual testing (
manualmode) - ✅ Execute batch testing for all endpoints automatically (
batchmode) - ✅ CI/CD-friendly non-interactive tests with proper exit codes (
cimode) - ✅ Response validation and structured test reports
- ✅ Compatible with Python 3.9+ and production-ready Flask projects
Installation
pip install flaskapptest
Usage
CLI entry point
flaskapptest --help
1. Manual Mode (Interactive)
flaskapptest manual --project /path/to/flask/project --base-url http://127.0.0.1:5000
Prompts you to select endpoints and fill payloads interactively
Useful for exploratory testing
2. Batch Mode (Automatic)
flaskapptest batch --project /path/to/flask/project --fail-fast
Automatically runs all detected endpoints
Optional --fail-fast stops execution on first failure
3. CI/CD Mode (Non-interactive)
flaskapptest ci --project /path/to/flask/project --base-url http://127.0.0.1:5000
Designed for CI/CD pipelines
Exits with:
0 → all tests passed
1 → test failures detected
2 → configuration/runtime error
Example
# Interactive manual testing
flaskapptest manual --project ./my_flask_app
# Automatic batch testing
flaskapptest batch --project ./my_flask_app --fail-fast
# CI/CD non-interactive testing
flaskapptest ci --project ./my_flask_app
Acknowledgements
Built by Ganesh Nalawade
Inspired by automated API testing concepts and AST-based code analysis
Release files for flaskapptest 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flaskapptest-2.0.0.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flaskapptest-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.7 kB
Release files / flaskapptest-2.0.0.tar.gz
| Download URL | flaskapptest-2.0.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc6e3fede6f99323578fb3f3eead8a071001515914eb4544236fec0f76afe0e7
|
|
BLAKE2b-256 checksum How to use checksums |
67d1e2c8e50ae9b10f23310e21ee627f0f1eb664dd5896250a4686036155f252
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.4
|
Release files / flaskapptest-2.0.0-py3-none-any.whl
| Download URL | flaskapptest-2.0.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d88ce6bd542639eea69309544419aa1e2c4d5b55a74f752031eb51b648da9134
|
|
BLAKE2b-256 checksum How to use checksums |
522a56cd4ebd643a4a30ad3e3493f774964ade4f63012ec0d315826a13da6264
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.4
|