How does dotcover report coverage if tests are failing?

Dotcover reports that a particular function/method in a file doesnt have coverage when there is actually a test for the function/method.

I noticed that this happens when the corresponding test is failing and so dotcover flags that this method doesnt have coverage. If the test passes, I dont see this issue.

I am wondering if this is intentional or if there are any settings that we can change. I dont want dotcover to flag lines of code as missing coverage because of a failing tests.

Any help is much appreciated.

1 comment
Alexander Mikhailov
Comment actions Permalink

Hello, Raj!

dotCover reports coverage only for statements that were actually hit by the control flow.
Please, ensure that code which you expect to be covered is executed when test fails. For example - try to set breakpoint there.


Please sign in to leave a comment.