jeudi 30 juillet 2015

How to detect untested ruby files?

I recently started working on a large Rails application. Simplecov says test coverage is above 90%. Very good.

However now and again I discover files that are not even loaded by the test suite. These files are actually used in production but for some reason nobody cared enough to even write the simplest test about them. As a result they are not counted in the coverage metrics.

It worries me since there is an unknown amount of code that is likely to break in prod without us noticing.

Am I the only one to have this problem? Is there a well-known solution? Can we have coverage metrics for files not loaded?

Aucun commentaire:

Enregistrer un commentaire