DEV Community

Discussion on: How high is your projects code coverage?

Collapse
 
rhymes profile image
rhymes

I have a project, which is and "old" Rails 5.1 monolith for a client ( 3 years and 10 months ago according to git log ) whose code coverage is at 98.81%

BUT

  • I've been the sole developer for 3 years and 4 months of that
  • There are too many unit and functional tests. Sometimes I get lost :D
  • It's probably easier to get so much code coverage if it's a solo project
  • the frontend and admin are wildly undertested and not included in the minitest coverage

The cool thing is how fast the unit, functional and integration tests still are:

Fabulous run in 76.789949s, 18.7134 runs/s, 40.5652 assertions/s.
1437 runs, 3115 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for MiniTest. 2835 / 2869 LOC (98.81%) covered.

I love minitest.

Generally I try to stay above 80%, this is definitely an exception.