Skip to main content

AI-powered test case generator for Python, Java, and JavaScript with OpenAI, Anthropic, and Google Gemini support

Project description

Voylla- Test Case Generator Bot

An AI-powered agent that analyzes code and generates comprehensive test cases for Python, Java, and JavaScript.

• User Guide: https://github.com/AryanSaxenaa/Voylla/blob/main/docs/USER_GUIDE.md • API Reference: https://github.com/AryanSaxenaa/Voylla/blob/main/docs/API_REFERENCE.md • Examples: https://github.com/AryanSaxenaa/Voylla/blob/main/examples/README.md

Voylla is a Published Package https://pypi.org/project/voylla/

Features

  • Multi-language Support: Python, Java, JavaScript
  • Comprehensive Test Generation: Unit, integration, and edge cases
  • Code Analysis: Detects edge conditions and performance risks
  • Coverage Reports: Analyzes test coverage gaps
  • Interactive Refinement: Conversational test case improvement
  • CI Integration: GitHub Actions support for PR test suggestions

Project Structure

test-generator-bot/
├── src/
│   ├── analyzers/          # Code analysis modules
│   ├── generators/         # Test case generators
│   ├── agents/            # AI agent logic
│   └── integrations/      # CI/CD integrations
├── tests/                 # Project tests
├── examples/              # Example code and generated tests
└── config/               # Configuration files

Quick Start

  1. Install from PyPI (recommended):
    pip install voylla
    
    Or for local dev: pip install -r requirements.txt
  2. Set up AI API key (optional but recommended):
    python setup_ai.py
    
    Or manually set environment variables:
    export OPENAI_API_KEY="your-api-key-here"
    # OR
    export ANTHROPIC_API_KEY="your-api-key-here"
    # OR
    export GEMINI_API_KEY="your-api-key-here"
    
  3. Run:
    voylla --file your_code.py
    

Examples:

  • Python: voylla -f examples/sample_code.py -l python -o test_output
  • JavaScript (auto): voylla -f examples/sample_code.js -o test_output
  • Java (auto): voylla -f examples/Sample.java -o test_output

AI Enhancement

The bot supports multiple AI providers for enhanced test generation:

  • OpenAI GPT-4: Set OPENAI_API_KEY environment variable
  • Anthropic Claude: Set ANTHROPIC_API_KEY environment variable
  • Google Gemini: Set GEMINI_API_KEY environment variable
  • Auto-detection: Will use available provider automatically
  • Mock Mode: Works without API keys (basic enhancement only)

Environment Variables

Copy .env.example to .env and configure:

# Choose provider: "openai", "anthropic", "gemini", "auto", or "mock"
AI_PROVIDER=auto
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here

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

voylla-0.2.3.tar.gz (85.2 kB view details)

Uploaded Source

Built Distribution

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

voylla-0.2.3-py3-none-any.whl (98.6 kB view details)

Uploaded Python 3

File details

Details for the file voylla-0.2.3.tar.gz.

File metadata

  • Download URL: voylla-0.2.3.tar.gz
  • Upload date:
  • Size: 85.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for voylla-0.2.3.tar.gz
Algorithm Hash digest
SHA256 b48bb170cf101c07a0c43bc1876a3d6663335873750679819ddda05e47bdf5c4
MD5 8a64e29a61ac9a3b6d994975541b361b
BLAKE2b-256 daf994de390771f690e45160c775a9403ec9664e9c13b519e1edf50491bb560b

See more details on using hashes here.

File details

Details for the file voylla-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: voylla-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 98.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for voylla-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1e3ab9055dc5a37e08edb37212a0386a5bfe52cc4ee68ec7f254c100eb453619
MD5 85a7e9a808ebae07cca107442441cda6
BLAKE2b-256 614b5b38b6f545a59220b70d75ca3ed5891861ae963257b6a4d49850b932d5a7

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