2012-04-16

VisualStudio 2010 registry chaos

Actually, not a chaos, but it is a catchy word..

The case started with a short note I've received from EmperorXLII:

I wanted to let you know that the new .vsix does not support
command-line execution through MSTest.exe of test assemblies.

In other words, from a VS command prompt,
    mstest /testcontainer:MyTest.dll
reports "No tests to execute".

I still had the .reg file from the previous version; adding
that to the registry fixes the mstest issue.

I immediatelly thought about two registry entries I intentionally skipped in the newest version, but they were really irrelevant. What really suprised me is that after running old .reg file - it started working. It simply could not.

If it started working when he used the old reg file, it means that he probably accidentially activated an version older than 2.1 (older than the one with 'installer'). The MSTest most probably loaded some old modules from the 1.2 or 2.0 version, not deleted and still sitting in the /PrivateAssemblies.

After what I've traced in the last few days, I'm quite sure about that!

2012-04-02

Few things about MS QualityTools internals in VS2010

As I was previously searching for the fix for IMessageSink problem, I was tempted also to check, why the runner does not respond properly when commands like "Run tests in current context" or "Run tests in current class" were not handled properly. It was very strange, because looking at the code of the runner, everything seemed in a perfect order. The tests were discovered, then were run, the results were displayed - although in somewhat distorted way: the Owner column was holding the class name, the ClassName column was empty, the FailureCount was not recorded at all, etc.

It was obvious that something was not right. The case of Owner was trivial - even the original author warned that he couldn't get the ClassName filled properly, so he artificially injected the name of the type to the Owner, just to be able to see, group, and sort the tests.

I immediatelly thought, that maybe the Visual Studio is relying on that very column, the ClassName, to navigate between the test and the code, and maybe it is some partial cause why the "Run in current context" does not work.