brief-rags-bench/run_e2e_tests.bat

66 lines
1.7 KiB
Batchfile

@echo off
REM Run end-to-end tests (requires ALL services running)
echo ========================================
echo Checking E2E Test Prerequisites
echo ========================================
echo.
REM Check if .env.e2e exists
if not exist "tests\e2e\.env.e2e" (
echo ERROR: tests\e2e\.env.e2e not found!
echo.
echo Please create .env.e2e from .env.e2e.example:
echo copy tests\e2e\.env.e2e.example tests\e2e\.env.e2e
echo.
echo Then edit .env.e2e with your configuration.
echo.
exit /b 1
)
echo ✓ E2E configuration file found
echo.
REM Check if DB API is running
echo Checking if DB API is running...
curl -f -s http://localhost:8081/health >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo.
echo WARNING: DB API is not responding at http://localhost:8081
echo E2E tests require DB API to be running.
echo.
echo Continue anyway? Tests will be skipped if services are unavailable.
pause
)
echo ✓ DB API is accessible
echo.
echo ========================================
echo Running E2E Tests
echo ========================================
echo.
echo NOTE: E2E tests are slow (real network calls)
echo Tests will be SKIPPED if services unavailable
echo.
.venv\Scripts\python.exe -m pytest tests/e2e/ -v -m e2e
if %ERRORLEVEL% EQU 0 (
echo.
echo ✓ All E2E tests passed!
exit /b 0
) else (
echo.
echo ✗ Some E2E tests failed or were skipped!
echo.
echo Common issues:
echo - Services not running (DB API, RAG backends)
echo - Invalid credentials in .env.e2e
echo - Network connectivity problems
echo - Test user doesn't exist in DB API
echo.
echo See tests/e2e/README.md for troubleshooting
exit /b %ERRORLEVEL%
)