Am working in Visual Studio 2013.
My Build and Running UT is successful.
But when i see code coverage results, Debug version is showing 83% and Release version is 70 %.
Why so much of difference is coming and whats the solution?
Am working in Visual Studio 2013.
My Build and Running UT is successful.
But when i see code coverage results, Debug version is showing 83% and Release version is 70 %.
Why so much of difference is coming and whats the solution?
Compiling code for release means that the compiler will perform much more aggressive optimizations, such as inlining functions, trimming unreachable paths, etc.. This will often mean you're left with less code in the final executable.
If this code "removal" happens mostly in areas of the code that happen to be well covered and less in areas of the code that are less covered, the overall coverage will be reduced.