I am trying to create a unit test in MS Test for a CMS application, wherein I have minority number of function that I wrote in my solution, the majority of the functions came along with CMS framework.
Issue:
When I take the code coverage it shows less than 1 percentage. But this coverage is meaningless.
Question:
How can I find coverage for only the functions that I wrote skipping the library functions that came along with cms framework?
You can configure which assemblies your code coverage should look for.
You need to edit .runsettings file for the Unit tests and add this
<ModulePaths>
<Exclude>
<ModulePath>Name of the dll goes here</ModulePath>
<!-- Add more ModulePath nodes here. -->
</Exclude>
</ModulePaths>
For more information refer the link https://msdn.microsoft.com/en-IN/library/jj159530.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With