This document outlines the testing strategy, test suites, and instructions for executing local unit/integration tests and production-level UI/UX browser tests.
These tests verify correct pipeline logic, DB schemas, and service-level components. They execute against a local SQLite instance or mocked DB configurations.
Unit tests verify classification confidences, scoring rules, and route parsing.
python -m pytest tests/unit -vIntegration tests check database connection setups and API endpoints. To prevent hitting supabase database instances during local runs, execute with the local SQLite fallback environment variable:
# On Windows PowerShell:
$env:DATABASE_URL="sqlite:///backend/lfsd.db"; python -m pytest tests/integration -v# On Linux/macOS Bash:
DATABASE_URL="sqlite:///backend/lfsd.db" python -m pytest tests/integration -vThese tests use Playwright to automate end-to-end user journeys (Sign in via Auth0, Dashboard check, Profile verification, and AI Chat prompt responses) directly on the live production environment.
Install Playwright and Chromium browser:
pip install playwright
python -m playwright install chromiumRun the automated persona validation script against https://app.helmory.com/:
python tests/e2e/test_browser_journeys.pyThe script logs in as three different personas and runs target prompt queries to verify domain routing:
| Persona | Test Prompt | Expected AI Validation |
|---|---|---|
Finance (finance@helm.com) |
Can I afford to spend $500 on a watch? | AI analyzes budget/saving goals and returns formatted advisory response. |
Time (time@helm.com) |
How much focus time did I have last week? | AI pulls calendar/productivity events and returns deep-work highlights. |
Health (health@helm.com) |
How much is an Uber to the Dubai Marina? | AI detects mobility intent, queries aggregator, and returns real-time ride options + pricing (Uber/Careem/RTA). |
After each run, the E2E script stores high-resolution screenshots of the UI state (dashboards, settings, chat bubbles) in the conversation artifact directory for visual audits.
- Verification files:
C:\Users\hmahm\.gemini\antigravity\brain\392bf087-902d-4f6e-94c7-00458be598a0\