Where’s my unit test?

While converting a hand-made extension framework to .NET MAF (Managed Add-ins Framework), I noticed that my existing unit tests disappeared from the test listing in the test manager. Also in ReSharper’s Unit Test Sessions the test cases would appear but be marked as ‘inconclusive’ run (the debugger not allowing to trace into anything). Then I noticed in the output window:

The thread '' (0x...) has exited with code 0 (0x0).
The program vstest.executionengine.x86.exe: Program Trace' has exited with code 0 (0x0).

Turns out that the modified assembly failed to load because the MAF walkthrough isolated the different pipeline components into new assemblies, each referenced as project with Copy Local property set to False. Because the assembly fails to load, the test manager can’t explore what test classes and methods are available in it (hence the disappearance from the list).

Changing Copy Local property would fix the issue, but is not a recommended approach according to MSDN for MAF. Instead MAF depend on a specific folder hierarchy which one has to setup using the build output project property (http://msdn.microsoft.com/en-us/library/bb384240.aspx). To be noted that some MAF samples on codeplex only have the build output configured properly for debug build.

Advertisements
This entry was posted in Microsoft, Travail, work. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s