Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I Use a Code Coverage Tool?

I'm interested in using a code coverage tool for my next .NET project but was wondering if it is necessary for me? I'm the only developer in the company I work for, so would using NCover be a benefit to me or is it just for large teams using continuous integration? Thanks

like image 236
CalebHC Avatar asked May 28 '09 04:05

CalebHC


2 Answers

I would say go for it. Analyzing code coverage can help even a single developer, maybe even moreso than a team, since you basically have the whole system on your shoulders. If you're the only developer, you have full control over what tools you use, and how you want things setup. Once/if more developers are added, you'll have all the tools in place to create quality software.

like image 143
Andy White Avatar answered Oct 02 '22 13:10

Andy White


If go to the effort to write automated tests, then definitely use a code coverage tool to get an idea about how which areas of the code base those test cover.

Viewing code coverage as you write tests is also helpful in ensuring that your tests are actually testing what you think they are.

The overhead of measuring code coverage compared with the overhead of writing tests theses days is so small, that it doesn't make sense to write tests, and then not view the coverage of those tests.

like image 44
npellow Avatar answered Oct 02 '22 11:10

npellow