Code Coverage Issue in VS 2012

I have a simple ASP.Net MVC 4 application with three simple tests.

Each of these tests succeeds, however the Code Coverage window gives me the following error:

Empty results: no binaries were instrumental. Make sure that the tests are running, the necessary binary files are loaded, the corresponding symbol files are not excluded using the user settings. For more information see http://go.microsoft.com/fwlink/?LinkID=253731

I did some research, but so far nothing has resolved my problem.

  • I know the tests are running
  • I have .pdb files in the same place as my .dll
  • I do not optimize by code
  • I can not find the .testsettings file
  • I also run VS VS Ultimate as an admin, but no luck.

If I find the .coverage file, all it has is:

PCHΓΏ 

Not the xmls results or the error message I expect.

+6
source share
2 answers

I understand that this is more than a year. However, I just ran into the same problem, right down to the text β€œPCH” in the .coverage file, and still haven't found a solution. But surely someone also had a problem, just in case, here is a simple solution:

After checking this

+5
source

If you cannot get Code Coverage to work even after you delete the * .suo file, check out the Event Viewer for errors. In my case, after each run, I had the following error:

"TraceLog Profiler failed to initialize due to lack of toolkit methods, the vstest.executionengine.x86.exe process"

I found the answer here .

If the link is no longer available, I insert the content here:

If you find an empty .coverage file and see errors similar to the one below in your event logs, you most likely have a damaged installation

(info) .NET Runtime version 4.0.30319.17929 - The profiler has requested that the CLR instance not load the profiler into this process. CLSID profiler: '{b19f184a-cc62-4137-9a6f-af0f91730165}'. Process ID (decimal): 12624. Message ID: [0x2516].

(Error) TraceLog Profiler could not be initialized due to a lack of instrumentation methods, the vstest.executionengine.x86.exe process

Check

a) The environment variable VS110COMNTOOLS is set to \ Common7 \ tools

b) Installed Regkey HKLM \ SOFTWARE \ Microsoft \ VisualStudio \ 11.0 \ InstallDir to your \ Common7 \ IDE \

c) covrun32.dll and covrun64.dll exist in "\ Team Tools \ Dynamic Code Coverage"

Good luck

Nadav

+4
source

Source: https://habr.com/ru/post/944805/


All Articles