I'm evaluating dotCover for a Windows Store Application and I'm trying to cover some unit tests for this using an MSTest unit test project (using VS2013). In my tests I'm using a Initialize method with the TestInitialize attribute to set up some stub classes. When I try to run the "Cover Unit Tests with dotCover" the tests always fail and when I check the coverage it shows the Initialize method in pink indicating it was never run, thus causing exceptions in my unit tests.
However when I just run the unit tests normally then the Initialize method does get called and all my tests pass. I also tried a console application with a unit test project and dotCover has no problem calling the TestInitialize method there. Is there some configuration setting I'm missing so that "Cover Unit" tests will succeed in Windows Store unit test projects?
Do you work with dotCover test runner or with ReSharper test runner? You can check this here: ReSharper | Options | Tools | Unit Testing and dotCover | Options | Unit Testing.
Could you please send us a sample solution where this problem is present?
I was initially using the dotCover test runner (I usually use ReSharper but it is not installed on the machine I had installed dotCover on). I also tried the MS Test test explorer and this ran the test successfully. Below is the options window I'm using for dotCover
And these were the results:
|Unit Test successful||Cover not successful|
When the "cover unit tests" was run, the unit test Initialize method was in pink:
I've attached the sample Windows store project with this small test. Thanks for your help!
The issue http://youtrack.jetbrains.com/issue/DCVR-6889 is already fixed and the fix will be included in the next release.
Current workaround is to disable "Collect per-test information for WinStore tests" in dotCover | Options | General.
That's great, thanks for your help - is there a release date for the next version?