#!/bin/bash # LLM API Test Runner # This script sets up the environment and runs the test suite echo "๐Ÿš€ Starting LLM API Test Suite..." # Check if virtual environment exists if [ ! -d "venv" ]; then echo "๐Ÿ“ฆ Creating virtual environment..." python3 -m venv venv fi # Activate virtual environment echo "๐Ÿ”ง Activating virtual environment..." source venv/bin/activate # Upgrade pip echo "โฌ†๏ธ Upgrading pip..." pip install --upgrade pip # Install dependencies echo "๐Ÿ“š Installing dependencies..." pip install -r requirements.txt # Run tests echo "๐Ÿงช Running test suite..." python -m pytest tests/ -v --cov=app --cov-report=term-missing --cov-report=html echo "โœ… Test suite completed!" echo "๐Ÿ“Š Coverage report generated in htmlcov/index.html"