Skip to main content

Production-grade Flask API testing CLI

Project description

FlaskAppTest

PyPI Python

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 (manual mode)
  • ✅ Execute batch testing for all endpoints automatically (batch mode)
  • ✅ CI/CD-friendly non-interactive tests with proper exit codes (ci mode)
  • ✅ 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flaskapptest-2.0.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flaskapptest-2.0.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file flaskapptest-2.0.0.tar.gz.

File metadata

  • Download URL: flaskapptest-2.0.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for flaskapptest-2.0.0.tar.gz
Algorithm Hash digest
SHA256 bc6e3fede6f99323578fb3f3eead8a071001515914eb4544236fec0f76afe0e7
MD5 9de4d62411fea59010973c51031cf95d
BLAKE2b-256 67d1e2c8e50ae9b10f23310e21ee627f0f1eb664dd5896250a4686036155f252

See more details on using hashes here.

File details

Details for the file flaskapptest-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: flaskapptest-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for flaskapptest-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d88ce6bd542639eea69309544419aa1e2c4d5b55a74f752031eb51b648da9134
MD5 88074418b8201b619ed7cd0b5c3c65d8
BLAKE2b-256 522a56cd4ebd643a4a30ad3e3493f774964ade4f63012ec0d315826a13da6264

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page