.NET code coverage tools don't work on native applications that load .net assemblies

StackOverflow https://stackoverflow.com/questions/5958548

  •  11-11-2019
  •  | 
  •  

質問

I am writing a plug-in module for Revit Architecture, which provides a .NET API. Essentially, you create an assembly with classes that implement a specific interface. Revit then loads the assembly and makes calls to the interface.

I would like to be able to get ongoing code coverage metrics for my plug-in code, but have found that all of the typical code coverage tools (NCover, PartCover, dotCover) do not work in this case, because the host Revit application (Revit.exe) is a Windows native application, not a managed application. The NCover documentation specifically states that NCover will not work if the process being covered is a native application process. I am assuming that the instrumentation techniques used by the other tools are similar and thus have the same root cause for not working.

I would like to know if there is a workaround for this case for any of the above tools, or if there is another code coverage tool or technique that I could use. TIA.

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top