Skip to content

08. Testing & Quality

Backend tests

Layout under backend/tests/:

Area Files
API smoke test_health.py, test_ingestion.py, test_jobs_api.py
OCR adapters test_ocr_vlm.py, test_ocr_sarvam.py
UC1 API test_uc1_factsheet_api.py
Unit unit/test_extraction.py, test_llm_client.py, test_text_sanitize.py, test_factsheet_models.py, test_uc1_factsheet_service.py

Command: make testuv run pytest (from project Makefile conventions).

Frontend quality

  • ESLint configured (eslint.config.js)
  • TypeScript project build via Vite
  • No Vitest/Playwright/Cypress suite found

Lint / format

  • Backend: black check (and ruff/mypy listed as dev tooling in manifests)
  • Frontend: pnpm lint
  • Root make lint orchestrates both

CI

docs/deployment/ci-cd.md describes CI, but no .github/workflows (or equivalent) in this checkout (Confirmed). Quality gates are local Makefile targets today.

What is well-tested vs risky

Well covered (relative) Risky / thin
Health, ingestion, jobs API shapes End-to-end live OCR with real VLMs
Factsheet models / service units Frontend regressions
Sanitize / extraction unit paths Auth (because unused)
Search/vector (unimplemented)
Migration/upgrade path (create_all only)

Quality interview Q&A

Q: How do you test Celery pipelines?
A: API tests and unit tests cover contracts and pure logic; full worker+LLM paths are environment-dependent and were not executed in this inspection.

Q: Biggest quality gap?
A: No automated CI and no frontend tests, plus docs that claim search/auth capabilities ahead of code.