Skip to main content

AI-powered test automation agent

Project description

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

Option 1: Pip / Pipx (recommended)

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

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

ai_test_agent-0.1.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

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

ai_test_agent-0.1.0-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

Details for the file ai_test_agent-0.1.0.tar.gz.

File metadata

  • Download URL: ai_test_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 48.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for ai_test_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba23d7df1826d424e0d412a6b77bfca125575cd16c11b7c5b239271c224f871a
MD5 6017b69824829bc4d8dab630cffdd470
BLAKE2b-256 1890e19abe24c5c11e33d2a81e86cc3102165dc5375041ca857ec218c335b0b6

See more details on using hashes here.

File details

Details for the file ai_test_agent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ai_test_agent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 57.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for ai_test_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3773ba21b323e13f2b8348981d130d80ad654c8d7e496837818f1fb23a9f24
MD5 a9f4e697d20eb533655b717bbae0d556
BLAKE2b-256 e73ce14abc582accb135a123dc6de51887e44179652d51f02d5bc31ff67d9ee3

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