TestDriven Macros for Keyboard Junkies
I've had a number of people email asking where the run all tests in solution command has gone. This command disappeared when I did some refactoring to unify the various 'Run Test(s)' commands. I actually did this to make TestDriven.NET more keyboard friendly. The idea was to make the 'Run Test(s)' command do the right thing depending on context. For example if the code window isn't active, it will execute tests in the highlighted 'Solution Explorer' item. For example if the 'Output' window is active, it will execute tests in the currently active source file. This only works if the 'Track Active Item in Solution Explorer' option is checked (I believe this is no longer the default setting in Visual Studio 2005).
Knowing how the 'Run Test(s)' command works, it is easy to write a macro that emulated the old run all tests in solution functionality. I've created a macro project here, that you can load using 'Load Macro Project...' in the 'Macro Explorer' tool window. Once loaded you will find a new 'Macros.TestDriven.RunTests.Solution' command that you can assign a shortcut key or add a tool bar button.
There a second command in the macro project that can be used to execute tests in a specific project item. This might come in useful if you've repeatedly running a subset of tests in the solution you're working on. When you download the macro you will find this command hard coded to run 'money\money\MoneyTest.cs' (i.e. solution 'money', project 'money' and project item 'MoneyTest.cs'). You can change this to target any solution, solution folder, project, project folder or project item you like. Note it will only execute the first test fixture in a given project item and assumes that a project folder has a corresponding namespace.