Skip to main content

AI Test Agent

An AI-powered test automation agent that analyzes code, generates tests, and produces detailed reports.

Features

  • Project Analysis: Analyzes project structure and identifies components for testing
  • Test Generation: Generates comprehensive tests for various programming languages
  • Test Execution: Runs tests and collects results
  • Reporting: Produces detailed test reports in multiple formats
  • Coverage Analysis: Generates code coverage reports
  • CLI Interface: Command-line interface for easy integration
  • Docker Support: Containerized for easy deployment

Supported Languages

  • Python
  • JavaScript/TypeScript
  • Java

Installation

Install the CLI globally so it is available from any project directory.

pipx install ai-test-agent
# or, if you are working from a checked-out repo
pipx install .

You can also install into an existing virtual environment:

pip install ai-test-agent

Option 2: Using Poetry (development)

git clone https://github.com/yourusername/ai-test-agent.git
cd ai-test-agent
poetry install

Using Docker

docker build -t ai-test-agent .
docker run -it ai-test-agent

Quickstart Workflow

  1. Initialize your project
    From inside the project directory you want the agent to manage:

    ai-test-agent init
    

    This creates .aitestagent/config.json with sensible defaults (paths, thresholds, model names).
    Rerun init at any time to regenerate or adjust the manifest.

  2. Analyze the codebase
    When inside an initialized project, you no longer need to repeat --project-path:

     ai-test-agent analyze
    

    Results are written to the configured analysis output path (defaults to analysis.json).

  3. Generate tests

    ai-test-agent generate
    

    Tests are written to the configured tests directory (defaults to tests/).

  4. Execute tests

    ai-test-agent run
    

    Test results and coverage thresholds respect the manifest configuration.

  5. Produce a report

    ai-test-agent report
    
  6. Run everything end-to-end

    ai-test-agent all
    

If you prefer to override any setting ad-hoc (e.g., a different output path), pass the flag and it will override the manifest for that invocation.

Commands At a Glance

Command Description
ai-test-agent init Create .aitestagent/config.json in the current project.
ai-test-agent analyze Parse the project and write the structural analysis.
ai-test-agent generate Generate tests into the configured output directory.
ai-test-agent run Execute tests, collect results, and enforce coverage thresholds.
ai-test-agent report Build an HTML report from stored results.
ai-test-agent all Run analyze → generate → run → report in one go.
ai-test-agent debug Attempt iterative fixes when tests fail.
ai-test-agent interactive (Placeholder) Future interactive workflow.

From outside an initialized project, you can still supply paths explicitly, e.g.:

ai-test-agent analyze --project-path /path/to/project

For a detailed option reference, see docs/CLI_REFERENCE.md.

Project Manifest

The manifest created by init lives at .aitestagent/config.json and stores relative paths and defaults for:

  • project root
  • tests/analysis/results/report output paths
  • coverage thresholds
  • default LLM model

Feel free to edit this file directly or rerun ai-test-agent init to regenerate it.
All commands look for the manifest in the current directory or any parent directory.

Configuration

Additional runtime settings can be provided via environment variables (particularly for LLM access):

  • OLLAMA_HOST: Host for Ollama service
  • OLLAMA_PORT: Port for Ollama service
  • DEFAULT_MODEL: Default LLM model to use

The CLI will also create .aitestagent/.env.example during init for convenience.

Contributing

  • Fork the repository
  • Create a feature branch
  • Make your changes
  • Add tests
  • Submit a pull request

Release files for ai-test-agent 0.1.0

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

Source distribution (sdist)

Source distribution for ai-test-agent 0.1.0
File Size Uploaded
ai_test_agent-0.1.0.tar.gz 48.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-test-agent 0.1.0
File Interpreter ABI Platform
ai_test_agent-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 106.2 kB

Release files / ai_test_agent-0.1.0.tar.gz

Download URL ai_test_agent-0.1.0.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ba23d7df1826d424e0d412a6b77bfca125575cd16c11b7c5b239271c224f871a
BLAKE2b-256 checksum
How to use checksums
1890e19abe24c5c11e33d2a81e86cc3102165dc5375041ca857ec218c335b0b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / ai_test_agent-0.1.0-py3-none-any.whl

Download URL ai_test_agent-0.1.0-py3-none-any.whl
Size 57.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b3773ba21b323e13f2b8348981d130d80ad654c8d7e496837818f1fb23a9f24
BLAKE2b-256 checksum
How to use checksums
e73ce14abc582accb135a123dc6de51887e44179652d51f02d5bc31ff67d9ee3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

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