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.1.tar.gz (85.1 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.1-py3-none-any.whl (98.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: voylla-0.2.1.tar.gz
  • Upload date:
  • Size: 85.1 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.1.tar.gz
Algorithm Hash digest
SHA256 d3aa39820bb4ccd93fac70425510c84f4428844b750e8e34989f04cc01a3f70a
MD5 2ab9ba86f5f24345b48ee12fc6aab4a8
BLAKE2b-256 8cda8d4bbc448a702d3aa0e6e8aa556ec11992f11c130bb40422a4ad30764452

See more details on using hashes here.

File details

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

File metadata

  • Download URL: voylla-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 98.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c8fce26139f032c4f53c00c9abd16df8107978ade03ba798722523adb6c1207
MD5 977411a61f2f0fb87be185532d45a7aa
BLAKE2b-256 ee60906c50fb238174315097c9e4bd1f67774a9852a5b7602b4ad9407316dc9f

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