Code Coverage using White.Core for unit testing WPF applications

Hi,

When I use the MSTest runner and analyze code coverage on a unit test that uses White.Core for automation testing of a wpf application it properly analyzes and shows me the coverage.

When i use DotCover 2.5 and Resharper 8 (This also did not work in DotCover 2.2 and Resharper 7.1.3) and run the same test with code coverage it does not do the coverage correctly.  It correctly covers normal tests but code that is executed via the White application does not.

Is there a setting or something that i am missing that enables this?  Does this capability just not exist?  I really want to use resharper for running unit tests exclusively but when i need to see coverage for the wpf ui tests using White.Core i have to switch to the mstest runner and i cannot see the full coverage of the application unless i run all coverage in the mstest runner.

5 comments

Hi Jason,

Could you please provide us with some sample solution illustrating this issue? It'll be very helpful for us. Or we can sign any NDA if needed and  you can share with us your working solution.
Thanks in advance.

0

I will try and build a sample for it tomorrow

0
Here is a sample project that i built.  This one is even worse actually.  When i run code coverage with dotcover it fails completely. I think it you can get it to work while running code coverage you will see the issue where it doesnt properly code coverage the Add method in Adder.  I set both my resharper mstest settings file and the mstest test runner settings file to the Local.testsettings in the solution.Resharper:Normal run - worksDebug run - worksCode coverage run - doesnt workMSTest runnerNormal run - worksDebug run - worksCode coverage run - works and shows proper code coverage.

Attachment(s):
TestCodeCoverage.zip
0

Hi Jason,

Sorry for the delayed answer.
I can't reproduce this issue neither with dotCover 2.2, nor dotCover 2.5 - the test passes and coverege report is done.
Could you provide some info about your environment? Namely:  

- OS version and bitness
- information from VS About dialog (Copy info).
- installed .Net frameworks versions (http://msdn.microsoft.com/en-us/library/hh925568.aspx)

Thanks in advance.
Regards.

0

Please sign in to leave a comment.