#!/bin/bash # Run all tests for the Educational Research Methods Chatbot echo "Running Educational Research Methods Chatbot Tests" echo "==================================================" # Create a virtual environment if it doesn't exist if [ ! -d "venv" ]; then echo "Creating virtual environment..." python3 -m venv venv fi # Activate the virtual environment source venv/bin/activate # Install requirements echo "Installing requirements..." pip install -r src/requirements.txt pip install pytest pytest-mock # Run the tests echo "Running backend API tests..." python -m pytest tests/test_chatbot.py -v echo "Running frontend tests..." python -m pytest tests/test_frontend.py -v echo "Running integration tests..." python -m pytest tests/test_integration.py -v echo "All tests completed." # Deactivate the virtual environment deactivate