Skip to main content

Coverage Requirements

This document outlines the code coverage requirements and reporting for Gofannon.

Coverage Thresholds​

MetricMinimum
Lines95%
Functions95%
Branches95%
Statements95%

Running Coverage Reports​

Frontend (Vitest)​

cd webapp/packages/webui
pnpm test:coverage
# Open ./coverage/index.html in browser

Backend (pytest)​

cd webapp/packages/api/user-service
python -m pytest tests/unit --cov=. --cov-report=html
# Open ./htmlcov/index.html in browser

All Coverage​

cd webapp
pnpm test:coverage

Report Formats​

Coverage is generated in multiple formats:

  • HTML - Interactive browser reports
  • XML - For CI/CD integration
  • LCOV - For Codecov uploads

Codecov Integration​

Coverage data is automatically uploaded to Codecov on CI runs. View reports at:

  • PR coverage diffs
  • Historical coverage trends
  • Per-file coverage breakdown

Excluding Files from Coverage​

Frontend (vitest.config.ts)​

coverage: {
exclude: ['**/node_modules/**', '**/test/**']
}

Backend (.coveragerc)​

[run]
omit =
tests/*
*/__pycache__/*