Friday, September 25, 2009

Empty Create Unit Test Window

Today a couple of the members of my team ran afoul of the "empty unit test window" problem that I had encountered a while back. there is a bug fix available here: http://support.microsoft.com/kb/962866 but I want to add something interesting to the story.

Just to clarify the problem manifests itself when you right click a method and select "Create Unit Tests...". The "Create Unit Tests" window opens with the content pane completely empty. I can't attest to which versions this all applies to but we are using VSTS 2008 SP1 with GDR 2 running on Windows 7 and Windows 2008.

When one of my team members came to me with this problem I had completely forgotten that I had encountered it myself and had previously found this hotfix and applied it to my system. Brilliant! So we proceeded to try a few things to get it working.

First we rebuilt the solution after performing a clean. No dice.

Next we had the developer exhibiting the problem shelve his code so that I could pull it down to my machine in case there was something funky in the changes he had just made. Nope. Worked fine on my machine! :-)

Next I asked him to clear his profile as I have seen a few problems resolved by doing that. Instead he simply logged onto his dev box with a different identity to try it out. Problem solved! OK it seems to be a profile thing we determine.

Well, not so fast. Of course, this other identity that we was working on had a feature enabled in Windows that he didn't like so he turned off User Access Control. Rebooted and, yes you guessed it, the "Create Unit Tests" window was empty again! To validate this behaviour we turned UAC back on and tried it again. "Create Unit Tests" window is populated!

Crazy times!

In the meantime I remembered the fix, we downloaded the patch and all is well in UAC deficient unit testing land.

0 comments: