The .NET code coverage tool does not work on native applications that load .net assemblies

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

I would like to be able to get the current code coverage for my plug-in code, but I found that all the typical code coverage tools (NCover, PartCover, dotCover) do not work in this case, since the Revit host application (Revit.exe) is a native application Windows, not a managed application. The NCover documentation states that NCover will not work if the process in question is a native application process. I assume that the tooling methods used by other tools are similar and therefore have the same root cause for inoperability.

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

+3
source share
2 answers

Our C # Test Coverage Tool should work for this.

It works using source code; you run the instrumental source code (in any way, including traditional compilation and launch methods). Therefore, it doesn't matter how the code is executed, just because it is somehow executed. Toolkit data is collected in the added class, and you have full control over how and when this data will be exported, so you can export from any environment.

0
source

NCover, PartCover dotCover .NET- , IL ( , PartCover NCover , ICorProfilerCallback JITCompilationStarted ..) , , ( Native code.).

, dotCover.

, , Coverage Validator

0

All Articles