'What constitutes full code coverage when I invoke dotCover from an MSTest build step in TeamCity?

What is considered 100% when I invoke dotCover from an MSTest build step in TeamCity? Is 100% all of the compiled code? Is it all the code for all the assemblies which the tests have touched? Is it all the classes which the tests have touched?

When I invoke dotCover from a TeamCity MSTest build step which runs My.Tests.dll, which lines are code are being tracked?



Solution 1:[1]

Not sure if I fully understood your question but will take a shot anyways. As I understand 100% coverage means that every line of code in the project is exercised by your test cases. Basically that means that you have ensured that control flows thru every line of code in your project.

In general I have never seen 100% coverage as its very difficult to test every code path. Consider for example different types of exceptions that are handled by your code, how do you exercise the catch block for each exception by some test case? You would need to simulate an exception somehow, which is not always easy.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Raam