Sign inSign up

iavipro/testteller

By iavipro

•Updated over 1 year ago

AI agent to generate contextual test cases & automation based on project docs & code.

Image
Developer tools
1

1.1K

iavipro/testteller repository overview

⁠TestTeller Agent

An AI-powered test-case generation and automation tool that leverages RAG architecture to analyze project documentation (PRDs, Design Docs, Contracts etc.) and project code to generate comprehensive test cases and then effectively automate them, using multiple supported languages and frameworks, while leveraging GenAI / LLMs ( Gemini, Ollama, Claude, OpenAI )

⁠🚀 Features

  • Multi-LLM Support: Works with Gemini, OpenAI, Claude, and Llama/Ollama
  • Document Processing: Supports multiple formats (PDF, DOCX, Markdown, Excel)
  • Vector Database: ChromaDB integration for intelligent document retrieval
  • Test Automation: Generates executable test code in multiple frameworks
  • Docker-First: Production-ready containerized deployment
  • Flexible Configuration: Environment-based configuration for different setups

⁠📋 Prerequisites

  • Docker and Docker Compose
  • API keys for your chosen LLM provider
  • (Optional) Ollama for local ( or within accessible network ) LLM inference

⁠🔧 Quick Start

⁠1. Create Environment File
# Create .env file with your configuration
cat > .env << 'EOF'
# Choose your LLM provider: gemini, openai, claude, llama
LLM_PROVIDER=gemini

# API Keys (configure based on your provider)
GOOGLE_API_KEY=your_gemini_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
CLAUDE_API_KEY=your_claude_api_key_here

# ChromaDB Configuration
CHROMA_DB_HOST=chromadb
CHROMA_DB_PORT=8000
CHROMA_DB_USE_REMOTE=true
DEFAULT_COLLECTION_NAME=test_documents

# Logging
LOG_LEVEL=Error
LOG_FORMAT=json
EOF
⁠2. Start Services
# Using Docker Compose
docker-compose up -d

# Or using Docker Run (requires separate ChromaDB)
docker run -d \
  --name testteller \
  --env-file .env \
  -v testteller_data:/app/chroma_data \
  iavipro/testteller:latest
⁠3. Generate Test Cases
# Help
docker-compose exec app testteller -h

# Configure
docker-compose exec app testteller configure

# Ingest documents
docker-compose exec app testteller ingest-docs /path/to/your/documents --collection-name your_collection_name

# Ingest code
docker-compose exec app testteller ingest-code /path/to/your/code --collection-name your_collection_name

# Generate test cases
docker-compose exec app testteller generate "Give more than 20 technical test cases" --collection-name your_collection_name -o test.md

# Automate test generation
docker-compose exec app testteller automate /your/generated/test-cases/file --language python --framework pytest --collection-name your_collection_name

⁠🔨 Usage Examples

⁠Document Ingestion
# Ingest local documents
docker-compose exec app testteller ingest-docs /app/local_docs -c your_collection_name

# Ingest from Git repository
docker-compose exec app testteller ingest-code https://github.com/user/repo.git -c your_collection_name
⁠Test Generation
# Generate test cases for specific files
docker-compose exec app testteller generate "All Integration tests" -c your_collection_name -f pdf

# Generate with custom output
docker-compose exec app testteller generate "All Integration tests" -c your_collection_name --output-file custom_tests.md
⁠Test Automation
# Python/pytest automation
docker-compose exec app testteller automate /your/generated/test-cases/file --language python --framework pytest -c your_collection_name

# JavaScript/Jest automation
docker-compose exec app testteller automate /your/generated/test-cases/file --language javascript --framework jest -c your_collection_name

⁠⚙️ Configuration

⁠Environment Variables
VariableDescriptionDefault
LLM_PROVIDERLLM provider (gemini/openai/claude/llama)gemini
GOOGLE_API_KEYGoogle Gemini API key-
OPENAI_API_KEYOpenAI API key-
CLAUDE_API_KEYAnthropic Claude API key-
OLLAMA_BASE_URLOllama server URLhttp://host.docker.internal:11434
CHROMA_DB_HOSTChromaDB hostchromadb
CHROMA_DB_PORTChromaDB port8000
CHUNK_SIZEDocument chunk size1000
CHUNK_OVERLAPDocument chunk overlap200
LOG_LEVELLogging levelINFO
⁠Volume Mounts
volumes:
  # Persistent ChromaDB data
  - chroma_data:/app/chroma_data
  
  # Temporary repository clones
  - ./temp_cloned_repos:/app/temp_cloned_repos
  
  # Optional: Local documents
  - ./local_docs:/app/local_docs:ro

⁠🌐 Deployment Scenarios

⁠Local Development
# Use with local Ollama
LLM_PROVIDER=llama
OLLAMA_BASE_URL=http://host.docker.internal:11434
⁠Remote ChromaDB
# Connect to external ChromaDB
CHROMA_DB_HOST=your-chromadb-server.com
CHROMA_DB_PORT=8000
CHROMA_DB_USE_REMOTE=true
⁠Production Deployment
# Use managed LLM services
LLM_PROVIDER=gemini
GOOGLE_API_KEY=your_production_api_key
LOG_LEVEL=WARNING

⁠🔍 Health Checks

The container includes health checks for:

  • ChromaDB connectivity
  • LLM provider availability
  • Application responsiveness
# Check service health
docker-compose ps
docker-compose logs app

⁠📊 Resource Requirements

⁠Minimum Requirements
  • CPU: 0.5 cores
  • Memory: 1GB
  • Storage: 2GB
  • CPU: 2 cores
  • Memory: 4GB
  • Storage: 10GB

⁠🐛 Troubleshooting

⁠Common Issues

ChromaDB Connection Failed

# Check ChromaDB health
docker-compose exec chromadb curl -f http://localhost:8000/api/v1/heartbeat

Ollama Connection Refused

# Ensure Ollama is running on host
curl http://localhost:11434/api/health

# For remote Ollama, update OLLAMA_BASE_URL
OLLAMA_BASE_URL=http://your-ollama-server:11434

⁠📖 Documentation

⁠🤝 Support

⁠📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE⁠ file for details.

Tag summary

Content type

Image

Digest

sha256:7579d6c95…

Size

299.4 MB

Last updated

over 1 year ago

docker pull iavipro/testteller