I also asked this question on the MSDN forums and did not find permission:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3686852&SiteID=1
The main problem here, as I see it, is that the interop compilation does not actually contain IL, which can be instrumental (with the possible exception of a few delegates). So, although I can put together a test project that uses an interaction layer, I cannot figure out how many of the methods and properties that I actually call.
Plan B is to go and write a code generator that creates an RCWW library (wrapping fairings at runtime) and a tool designed to cover the code.
Edit: @Franci Penov,
Yes, exactly what I want to do. The COM components supplied to us are a library of several dozen DLLs containing approx. 3000. We use this library in our application and accuse us of testing this Interop layer, since the group delivering the libraries for us conducts minimal testing. Coverage of the code will allow us to ensure that all interfaces and co-classes are executed. That is all I am trying to do. We have separate test projects that use our own managed code.
Yes, ideally, the COM server team should test and analyze their own code, but we do not live in an ideal world, and I must provide a quality product based on their work. If you can prepare a test report that states that I tested 80% of my code interfaces, and 50% of them do not work in accordance with advertising, I can fix errors when it is necessary to perform corrections, and not workarounds.
The layout you mentioned will be useful, but ultimately will not achieve the goal of testing the Interop layer itself, and of course I would not want to support it manually - we are at the mercy of the COM guys in terms of interface changes.
As I mentioned above, the next step is to create wrappers for wrappers and a testing tool.