This directory contains comprehensive documentation for testing the Gofannon project.
Gofannon maintains a comprehensive testing strategy with:
# From the webapp directory cd webapp # Run all unit tests (frontend + backend) pnpm test:unit # Run all integration tests (backend + E2E) pnpm test:integration # Run everything pnpm test
# Frontend coverage pnpm test:coverage:frontend # Backend coverage pnpm test:coverage:backend # All coverage pnpm test:coverage
# Frontend unit tests only pnpm test:unit:frontend # Backend unit tests only pnpm test:unit:backend # Backend integration tests only pnpm test:integration:backend # E2E tests only pnpm test:e2e
webapp/
├── packages/
│ ├── webui/ # Frontend React app
│ │ ├── src/
│ │ │ ├── components/
│ │ │ │ ├── ActionCard.jsx
│ │ │ │ └── ActionCard.test.jsx # Component unit tests
│ │ │ └── test/
│ │ │ ├── setup.ts # Vitest setup
│ │ │ └── utils.test.js # Utility tests
│ │ ├── vitest.config.ts # Vitest configuration
│ │ └── package.json
│ │
│ └── api/
│ └── user-service/ # Backend Python API
│ ├── tests/
│ │ ├── conftest.py # Pytest fixtures
│ │ ├── unit/ # Unit tests
│ │ │ ├── test_user_service.py
│ │ │ └── test_user_model.py
│ │ ├── integration/ # Integration tests
│ │ │ └── test_health_endpoint.py
│ │ └── factories/ # Test data factories
│ │ ├── agent_factory.py
│ │ ├── user_factory.py
│ │ └── chat_factory.py
│ ├── pytest.ini # Pytest configuration
│ ├── .coveragerc # Coverage configuration
│ └── requirements.txt
│
├── tests/
│ └── e2e/ # Playwright E2E tests
│
└── playwright.config.js # Playwright configuration
.github/
└── workflows/
├── pr-unit-tests.yml # Runs on every PR
└── nightly-integration-tests.yml # Runs every night at 2 AM UTC
tests/unit/tests/integration/webapp/tests/e2e/cd webapp/packages/webui pnpm test:coverage # Open ./coverage/index.html in browser
cd webapp/packages/api/user-service python -m pytest tests/unit --cov=. --cov-report=html # Open ./htmlcov/index.html in browser
When you open a PR, the following tests run automatically:
PR will be blocked if:
Every night at 2 AM UTC, comprehensive tests run:
Team is notified if:
test_user_creation_with_valid_data)