I'm getting different test coverage metrics from NCrunch vs. VS Test. NCrunch is reporting 63% test coverage while VS is reporting 71%. This is VS 2017 and NUnit 3. All unit tests are passing. Any ideas why these would be different?
Remco NCrunch Developer
#12048
16 Apr 2018 23:08 UTC
Hi, thanks for posting.
There are differences in how VS and NCrunch capture and process coverage information. NCrunch has a lower resolution in that it captures coverage line-by-line rather than statement-by-statement. This is done for performance and complexity reasons.
However, I don't think this would account for such a large difference, and it would usually result in the code coverage being higher under NCrunch than under VS.
It's hard for me to say why this is different without being able to do a side-by-side comparison. I recommend drilling down into your code to identify the differences. It may be the result of an ignored test or a difference in runtime behaviour.
There are differences in how VS and NCrunch capture and process coverage information. NCrunch has a lower resolution in that it captures coverage line-by-line rather than statement-by-statement. This is done for performance and complexity reasons.
However, I don't think this would account for such a large difference, and it would usually result in the code coverage being higher under NCrunch than under VS.
It's hard for me to say why this is different without being able to do a side-by-side comparison. I recommend drilling down into your code to identify the differences. It may be the result of an ignored test or a difference in runtime behaviour.
Post a reply
Log in to reply.