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.2.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.2-py3-none-any.whl (98.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: voylla-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ec9c0e3bea6728aa3ebbf4dbc09af44f316047b5b00e4c7d93e80498e07e96b2
MD5 c9802d8bb31a3c86c0f24b645c6a388b
BLAKE2b-256 5824a1e42efe9809e45238e40b6e9f0932653355e8bb8b979c0f5cda7440c1ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: voylla-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e77d8dbe9952855d3fee83e8ba78537e22ab2b14a5028ab400f99440d8e5cd5e
MD5 d1751883e33d1f73f8ce356330c3f257
BLAKE2b-256 d649e7f518dd6df323ecc1a992bab4008e399a87802142d9968df3b9c5f7885d

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