Skip to content

test: increase coverage baseline from 67% toward 80% target #690

@unclesp1d3r

Description

@unclesp1d3r

Summary

SimpleCov is configured with a 67% minimum baseline and 80% target, but current coverage sits closer to the baseline. Closing this gap improves confidence in refactoring and catches regressions earlier.

Current Configuration

From spec/spec_helper.rb:

  • Minimum coverage: 67% (baseline)
  • Target coverage: 80%
  • Branch coverage enabled
  • LCOV formatter for undercover integration

Coverage Gaps to Investigate

Areas likely under-covered based on test file distribution:

  1. Admin controllers — 8 dashboard controllers with limited dedicated specs
  2. Mailers — no dedicated mailer specs observed
  3. View components — 16 components vs 12 component specs (some may lack coverage)
  4. Background jobs — edge cases in ProcessHashListJob (196 lines) and UpdateStatusJob (200 lines)
  5. Model edge cases — complex state machine guard conditions may have untested paths

Acceptance Criteria

  • Run COVERAGE=true bundle exec rspec and identify modules below 80%
  • Add tests for the lowest-covered modules
  • Raise SimpleCov minimum baseline incrementally (67% → 70% → 75% → 80%)
  • Ensure undercover passes on all new/changed lines

Notes

This is an ongoing effort, not a single PR. Consider raising the baseline by 3-5% per sprint until reaching the 80% target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttestingTesting infrastructure and test coverage

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions