Why did I * not * collect code coverage data in unit tests, in VS2008?

If I run a test suite, is there a reason why I would not want to collect code coverage data for tests?

What is the expected cost in terms of lead time, storage, or anything else? I am trying to decide if I will ever start collecting coverage data for the OFF code.

+4
source share
2 answers

The reason this is not done in unit tests is because unit tests can run quickly, so you have no excuse not to run your unit tests.

Given your question, it seems that you are not worried about any delay caused by the collection of this information; my recommendation is to keep it as it is, and when the delay becomes a “concern,” then spend some time creating a “quick” build and a “cover”.

+4
source

I would not use code coverage as an absolute measure of anything. High code coverage is good, but 100% code coverage is not necessarily better, and could be worse in terms of the time taken to cover this last bit.

As part of a larger metric package, however, the code coverage is great.

+2
source

All Articles