I’m having trouble organising unit tests in Visual Studio. Once the tests are in test lists, changing namespaces, changing TestClass names etc. blows away all of the test list organisation structure. I case see in the solution’s vsmdi file that each test and test list gets a unique GUID, which changed is the path changes, but I can’t see any way of updating the test lists to use the new GUID of the new location.
Perhaps there is a tool I am missing to relocate tests without breaking the structure?
Unfortunately the test list is not clever enough to keep track of changes like renaming classes or methods – if you change something the test ends up in ‘tests not in a list’, and the vsdmi file is regenerated as you have discovered. For this reason, I tend not to use test lists or check vsdmi files into source control.
Instead, I use the ‘group by’ pull down in the test list editor window, and group by project or full class name (which makes it important to use namespaces consistently).
In VS 2011 test lists are deprecated, so I don’t expect this to be fixed.