Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find any coverage data (.coverage or .coveragexml) files. Check test run details for possible errors

Tags:

I am using Visual Studio Ultimate and I cannot get code coverage data. All of my unit tests pass, and I edited the Local.testsettings file to enable code coverage and configured it to reference the dll of my project. Also the active test setting is set to Local.testsettings and not TracAndTestImpact.testsettings.

like image 970
Joe Avatar asked Oct 15 '10 18:10

Joe


2 Answers

I had the same problem. I configured my .testsettings to include code coverage as detailed here: http://msdn.microsoft.com/en-us/library/dd504821(VS.100).aspx

What I was doing wrong is that I was running the test by pressing F5 in Visual Studio.

What I needed to do was double-click the ".vsmdi" file, which will open the "Test List Editor". Then I clicked the "Run Tests in Current Context" - (Ctrl+R, T) in the Test Code command bar. Code Coverage worked after that.

Hope this helps.

like image 161
Garry English Avatar answered Dec 10 '22 22:12

Garry English


Don't know if you still have this problem, but I had a similar issue and I've managed to fix it. I removed the testrunconfig file from my solution folder. Then added it back in and it came up with the settings dialog box, where I enabled the code coverage. Then I double clicked on code coverage and it came up with a list of dlls and I selected the ones that I needed. It saved the settings correctly and now when I run my tests, I can see the results in code coverage.

Hope this helps someone.

like image 44
Divi Avatar answered Dec 11 '22 00:12

Divi