Skip to content

Startup initialization code (seeding) shouldn't require unit test coverage #374

Description

@DigiBanks99

BudgetSeedingExtensions.cs creates demo data on app startup. Achieving high unit test coverage requires:

  • Mocking entire EF Core context
  • Complex test fixtures replicating DB state
  • Testing code that's already validated by integration tests

Root cause: Codecov treats all code equally. But startup/initialization code is infrastructure, not business logic.

Solution: Document that certain code categories (seeding, initialization, infrastructure setup) should be excluded from coverage thresholds. Provide codecov.yml patterns for this.

Pattern used: Added to ignore list in codecov.yml

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

    agent-exAgent/Copilot experience issues and learnings

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions