locked
Code coverage always returns empty result set RRS feed

  • Question

  • I am using MS Visual Studio Premium 2013 update 4. Whenever I try to use code coverage I always get the following "Empty results generated: No binaries were instrumented. Make sure the tests ran, required binaries were loaded, had matching symbol files, and were not excluded through custom settings. For more information see http://go.microsoft.com/fwlink/?LinkID=253731". Code coverage has worked before. I followed the link and have tried some other suggestions on the web but none of them work.

    I have tried the following things to get normal results

    • deleted the SUO file
    • made sure all test were run(all test run successful)
    • not seeing any previous result
    • not using optimisation
    • not using a runsettings file
    • pdb files are in the same location as the assemblies
    • restarted VSS
    • restarted pc
    • deleted the whole solution and retrieved from TFS
    • the same solution works with all my co workers

    Does anyone have any other suggestion for solving my issue


    Thursday, January 8, 2015 3:59 PM

Answers

  • Hi Luc,

    According to your description, I suggest you can try to run testsettings file using mstest.exe in command line and then check if you can collect the Code coverage result.

    Reference:

    http://msdn.microsoft.com/en-us/library/ms182489.aspx

    In addition, as you said that same solution works with all your co workers, I doubt the issue may be more related to the VS IDE. Therefore, I suggest you can try the following steps to check this issue.

    Step1: I suggest you can try to run your test in VS safe mode and then if you can get the Code coverage result.

    (1)If you can get the Code coverage result, I doubt that you may be install some Add-ins impact the test result. So I suggest you can try to disable or un-install them and then check the issue again.

    (2)If you still did not get the Code coverage result, I suggest you can try to reset the VS setting and then check this issue.

    Step2: if the above suggestion does not work, maybe you will need to repair or re-install your MS Visual Studio Premium 2013 update 4 would be better.

    Hope it help you!

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Luc Neville Friday, January 9, 2015 12:47 PM
    Friday, January 9, 2015 6:08 AM

All replies

  • Hi Luc,

    According to your description, I suggest you can try to run testsettings file using mstest.exe in command line and then check if you can collect the Code coverage result.

    Reference:

    http://msdn.microsoft.com/en-us/library/ms182489.aspx

    In addition, as you said that same solution works with all your co workers, I doubt the issue may be more related to the VS IDE. Therefore, I suggest you can try the following steps to check this issue.

    Step1: I suggest you can try to run your test in VS safe mode and then if you can get the Code coverage result.

    (1)If you can get the Code coverage result, I doubt that you may be install some Add-ins impact the test result. So I suggest you can try to disable or un-install them and then check the issue again.

    (2)If you still did not get the Code coverage result, I suggest you can try to reset the VS setting and then check this issue.

    Step2: if the above suggestion does not work, maybe you will need to repair or re-install your MS Visual Studio Premium 2013 update 4 would be better.

    Hope it help you!

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Luc Neville Friday, January 9, 2015 12:47 PM
    Friday, January 9, 2015 6:08 AM
  • thanks for your answer.

    More things I tried since:

    • disabling all extensions and updates with disabling possibility
    • repairing visual studio premium 2013 update 3 and update 4
    • from your post I tried mstest with a newly created testsettings file but this does not show any code coverage result ( i tried both with and without code coverage visual studio 2010, data and diagnostics for selected role) but this gives me the following result  Cannot find any coverage data (.coverage or .coveragexml) files. Check test run details for possible errors. ----i get a warning that disabling deployment is ignored for the test run because code coverage is enabled in the active test settings. There were no other warning or errors on my mstest run.
    • in safe mode my test explorer does not load correctly. tried this with and without running as administrator. it produces the following errors

    An exception was encountered while constructing the content of this frame.  This information is also logged in "C:\Users\lneville.LNM\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".

    Exception details:
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
       at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()

    Next up is re installing visual studio hopefully that will solve this problem.


    • Edited by Luc Neville Friday, January 9, 2015 11:47 AM
    Friday, January 9, 2015 11:41 AM
  • reinstalling solved my problem.  thanks for your help
    • Edited by Luc Neville Friday, January 9, 2015 12:55 PM
    Friday, January 9, 2015 12:47 PM