OpenCover missing PDBs exception

432 views Asked by At

I am working on a Windows Phone 8.1 app. This app has it's Unit Tests implemented using the MSTestFramework. To run the tests we need to use vstest.console.exe and also generate an .appx file for the unit test project. Now I need to use OpenCover for analyzing the tests and get a coverage report.

I am following this tutorial but so far I can't get it working.

As per the tutorial, I have created a batch file which contains the following line:

vstest.console.exe myApp_1.0.0.0_x86_Debug.appx /Settings:C:\Test\Test.runsettings /logger:trx

I then call OpenCover using the following command:

OpenCover.Console.exe -target:C:\Test\myBat.bat -register -output:out.xml

but this results in the missing PDBs exception. The above command actually kicks off all the tests and I can see that vstest.console has created a trx file and all tests passing but no report is generated by OpenCover.

I have tried to use the following command as well:

OpenCover.Console.exe -target:C:\Test\myBat.bat -register -output.xml -targetdir:<TargetDir>

In the TargetDir field I have tried giving the path of myProject\obj\x86\Debug - as this contains PDB files. After this did not work I tried giving TargetDir the path of myProject\AppPackages\myProject_x86_Debug_Test - this contains both appx and appxsym files. Finally, I tried copying all files from the Debug folder into the app packages folder and that did not work as well.

I am guessing that OpenCover isn't yet ready for providing coverage for windows phone apps. If OpenCover supports Windows Phone Apps then I would like to know how and if there is anything wrong in my approach.

1

There are 1 answers

2
Pepper On

I'm currently have the same problem so I can't provide the answer yet. But have you tried -register:user instead of -register?

openCover.Console.exe -target:C:\Test\myBat.bat -register:user -output:out.xml