Is dotCover coverage accurate even if some tests fail?

I have some nUnit tests that are currently failing. For some corporate reasons, I don't want to spend any time trying to fix those tests right now. But I am running a dotCover coverage report on these tests, and I want to know whether the "Uncovered" line count is inclusive or exclusive of these failing tests. To put it another way, if all the tests were to pass, would the coverage percentage increase?

These are new projects, so I have no baseline to understand whether the figure has dropped.

Yes, the tests will be fixed in due course, but not today / now.

1 answer

  • answered 2022-05-04 10:02 Ermiya Eskandary

    dotCover's 'Uncovered' line count is inclusive of the failing tests, meaning that if you fixed the tests it should decrease as more 'lines' are now covered by successful tests.

    Yes, the coverage percentage would also increase in proportion to the number of lines covered increasing.

    Failing tests -> less lines covered -> lower test coverage %
    Passing tests -> more lines covered -> higher test coverage %

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum