Skip to content

Test Coverage: Achieve >80% test coverage #4

Description

@OneByJorah

Test Coverage Gap

Current State: No tests exist in the codebase. Zero test coverage.

Required:

  1. Backend (Python/FastAPI/Flask):

    • Add pytest with pytest-cov
    • Unit tests for auth routes (login, register, password change)
    • Unit tests for streams CRUD
    • Unit tests for recordings CRUD
    • Unit tests for events CRUD
    • Unit tests for schedules CRUD
    • Unit tests for analytics
    • Unit tests for backup
    • Unit tests for health check
    • Integration tests with test database
    • Target: >80% coverage
  2. Frontend (React):

    • Add Jest + React Testing Library
    • Component tests for Dashboard, Login, Settings, Timeline
    • API integration tests
    • Target: >80% coverage
  3. FFmpeg Processor:

    • Unit tests for event saving, cleanup functions
    • Mock FFmpeg subprocess calls
  4. Add to CI pipeline:

    • Coverage reporting (Codecov or similar)
    • Fail build if coverage drops below 80%

Priority: HIGH

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions