Skip to main content

Recon Banner

An automated API testing and root-cause analysis platform that discovers OpenAPI endpoints, plans multi-category test suites, executes with bounded concurrency, and diagnoses failures with AI.

PyPI Version Python Version FastAPI Playwright License


Platform Visual Preview

Autonomous CLI Test Runner Interactive HTML Report & RCA
Recon Terminal Execution Interactive HTML Report

⚡ Quick Demo (Proof in Action)

# 1. Install directly from PyPI
pip install recon-qa

# 2. Run automated test suite against any running API or OpenAPI spec
recon test https://petstore.swagger.io/v2/swagger.json --concurrency 4
+-----------------------------------------------------------------------------+
| Recon AI QA Agent                                                           |
| Target: https://petstore.swagger.io/v2/swagger.json | Concurrency: 4        |
+-----------------------------------------------------------------------------+
[INFO] Auto-detected OpenAPI specification at swagger.json
[INFO] Generated 24 test cases (Happy Path, Boundary, Validation, Auth)
[INFO] Executing 24 tests with concurrency=4
 PASSED API-001 [POST /v2/pet] Happy Path - Valid Request (42ms)
 PASSED API-002 [GET /v2/pet/findByStatus] Happy Path - Valid Status (38ms)
 FAILED API-003 [POST /v2/pet] Boundary - Empty Body (55ms) - HTTP 400
 PASSED API-004 [GET /v2/user/login] Auth - Valid Credentials (21ms)
 ...
[INFO] Root Cause Analysis Engine:
 ↳ Identified missing required property in payload for /v2/pet (Confidence: 92%)
 ↳ Suggested Fix: Ensure required 'name' and 'photoUrls' fields are provided in request body

+------------------------- Recon Test Run Completed --------------------------+
| Execution Summary                                                           |
|   Total Tests : 24  |  Passed : 22  |  Failed : 2  |  Pass Rate : 91.7%     |
|   HTML Report : reports/run-20260828-095131-1b5354/report.html              |
|   Latest Link : reports/latest.html                                         |
+-----------------------------------------------------------------------------+

Architecture & Pipeline

Recon coordinates automated endpoint discovery, test matrix generation, bounded async workers, and dual-layer failure classification.

End-to-End Execution Flow

Target Application URL / OpenAPI Spec
        │
        ▼
  Discovery Engine ──► OpenAPI 3.x / Swagger Parser & Playwright Crawler
        │
        ▼
  Deterministic Test Planner
        │
        ├── Happy Path Cases       (Valid payload matching schemas)
        ├── Validation Checks      (Missing required field permutations)
        ├── Boundary & Edge Cases  (Empty strings, zero values, negative IDs)
        ├── Negative Cases         (Type violations, malformed inputs)
        └── Auth / Security Cases  (Missing/invalid bearer tokens)
        │
        ▼
  Async Worker Pool (Bounded Concurrency: 4–16 workers)
        │
        ├── API Runner (httpx, status codes, JSONPath assertions)
        └── Browser Runner (Playwright headless DOM navigation)
        │
        ▼
  Evidence Collector (HTTP traces, responses, DOM logs)
        │
        ├── Deterministic Failure Classifier (HTTP 4xx/5xx, timeouts, assertions)
        └── AI Root-Cause Analyzer (Fact extraction ──► Hypothesis ──► Suggested Fix)
        │
        ▼
  Self-Contained Interactive HTML Report + JSON Telemetry

Core Services

Module Technology Role
Discovery Engine Pydantic v2 + httpx Auto-detects OpenAPI 3.0, 3.1 & Swagger 2.0 specs
Test Planner Python 3.12 AST Generates categorized test matrices without manual scripting
Concurrency Pool asyncio + WorkerPool Bounded parallel test execution (4–16 workers)
RCA Engine Deterministic + LLM Rule-based failure classification & AI remediation recommendations
Reporting Jinja2 + Tailwind CSS Standalone interactive HTML reports with assertion step diffs
CLI Interface Typer + Rich Colorized terminal telemetry and interactive progress meters

Key Infrastructure Decisions

  • Deterministic Testing First — AI operates as an analytical reasoning layer, not an unpredictable execution engine. Tests pass/fail on concrete assertions.
  • Bounded Worker Pool — Prevents server overload by capping concurrent asynchronous HTTP connections via asyncio queues.
  • Provider-Agnostic LLM Engine — Seamless support for Google Gemini, OpenAI, Anthropic Claude, Mistral AI, Ollama, DeepSeek, and custom endpoints.
  • Self-Contained HTML Reports — Zero external CSS/JS CDN dependencies; all styles, charts, and diffs are inline for offline auditing.

Features

  • Automated OpenAPI Discovery: Parses OpenAPI 3.0, 3.1, and Swagger 2.0 schemas into strongly-typed parameter trees.
  • Multi-Category Test Suites: Generates Happy Path, Validation, Boundary, Negative, and Authentication test suites automatically.
  • Asynchronous Execution Pool: Runs tests in parallel with configurable worker limits (--concurrency 4-16).
  • Dual-Layer Root Cause Analysis: Pairs deterministic HTTP error categorization with confidence-scored AI diagnosis.
  • Multi-Provider AI Intelligence: Seamless out-of-the-box support for Google Gemini, OpenAI, Claude, Mistral, Ollama, and DeepSeek.
  • Actionable Remediation: Produces concrete code-fix and payload adjustment recommendations.
  • Interactive HTML & JSON Reports: Comprehensive dashboard with execution timelines, failure taxonomy, and step traces.

Tech Stack

  • Core Engine: Python 3.12, Pydantic v2, httpx, asyncio
  • CLI & UX: Typer, Rich
  • Browser Automation: Playwright Async
  • Analysis & AI: Google Gemini, OpenAI, Claude, Mistral, Ollama, DeepSeek
  • Persistence & Reports: SQLAlchemy, SQLite, Jinja2, HTML5/CSS3
  • Distribution: PyPI (recon-qa)

Getting Started

1. Installation

# Core CLI + AI testing (includes Google Gemini, OpenAI, Claude, Mistral, Ollama)
pip install recon-qa

# With Playwright browser testing support
pip install "recon-qa[browser]"
playwright install chromium

2. Run Test Suite Against an API

# Basic test execution
recon test http://localhost:8000

# With bounded concurrency & custom OpenAPI path
recon test http://localhost:8000 --openapi /api/v1/openapi.json --concurrency 8

# With AI Root-Cause Analysis enabled
recon test http://localhost:8000 --ai --provider gemini --model gemini-flash-latest

Environment Variables Reference

Variable Description Default / Example
RECON_LLM_PROVIDER Default LLM provider for failure RCA gemini (openai, mistral, ollama)
RECON_LLM_API_KEY API Key for selected provider Required for --ai
RECON_LLM_MODEL Target language model gemini-flash-latest / gpt-4o-mini
RECON_LLM_BASE_URL Base URL for OpenAI-compatible or local Ollama endpoints http://localhost:11434/v1
RECON_CONCURRENCY Default worker pool concurrency limit 4
RECON_TIMEOUT HTTP request timeout in seconds 15
RECON_REPORTS_DIR Output directory for HTML and JSON reports ./reports

Testing & Quality Assurance

# Run unit & integration test suites
pytest tests/ -v

# Run with coverage report
pytest --cov=recon tests/

Test suites cover:

  • OpenAPI 3.x and Swagger 2.0 schema normalization
  • Deterministic test generator permutations
  • Bounded async worker concurrency & error recovery
  • Deterministic failure classification & RCA prompting
  • HTML report rendering & schema validation

License

MIT

Release files for recon-qa 0.1.3

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

Source distribution (sdist)

Source distribution for recon-qa 0.1.3
File Size Uploaded
recon_qa-0.1.3.tar.gz 70.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for recon-qa 0.1.3
File Interpreter ABI Platform
recon_qa-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 155.2 kB

Release files / recon_qa-0.1.3.tar.gz

Download URL recon_qa-0.1.3.tar.gz
Size 70.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5029cf666fefe5060508402eb3fa9a560949d9e5e91a4474e30c8a8178f762af
BLAKE2b-256 checksum
How to use checksums
d52d77f98f39906f5e77e576d58a87dc722f217306dc4df7a4622f2772000542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / recon_qa-0.1.3-py3-none-any.whl

Download URL recon_qa-0.1.3-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09ac9a9eb4eff05a7e1d8a8b6a02efe90702e456e0b2b3ec04f79f7a4e245efe
BLAKE2b-256 checksum
How to use checksums
f9d24c8c41321fa8a408c056329907568eb8439bd0245f5ed23169be41674cf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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