Search code examples
visual-studio-2010mstestcode-coverageaccessorncover

How does NCover coverage report handle MSTest accessors?


MSTest + Visual Studio generates accessors which appear on the NCover coverage report. They usually have a low coverage in my case. I wonder if I use them in my tests if the method I'm testing will appear as covered in the Accessor but not in the original source code.

If this is the case, it is a problem and I need a solution.


Solution

  • The dev team was interested in this issue and created an MSTest private accessor project in VS 2010.

    I ran coverage on it in NCover 3 with MSTest, and it appears that these accessors are reflecting the source code, not a generated version of it, at least in our test.

    If you'd like to get the test project and try it out, just contact us at support@ncover.com.

    Thanks!