Shadow
Shadow

Reputation: 1

Dotcover is reporting no covearge if correpronding 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 test.

Any help is much appreciated.

Upvotes: 0

Views: 82

Answers (1)

Maria
Maria

Reputation: 526

dotCover displays coverage results and treats code as covered regardless of test failures. The important thing is that the code within a test is invoked before a failure occurs. For example, if the corresponding ‘SetUp’ method fails, then coverage data for this test will be missing.

Upvotes: 1

Related Questions