TestDriven.NET RC2: Keyboard Mapping
Peter Provost - If the focus is on the Output window, and you use a hotkey to launch the addin, you get an output message that says, "Unknown window vsWindowTypeOutput". It sure would be nice if it could find the topmost open editor and use the first test class in there.
In this latest release I have imporved the way TestDriven.NET chooses a set of tests the execute. If the code editor window is selected, the test(s) to execute will be determined by the position of the caret. All test(s) in a method, class or namespace can be executed this way. If any other window is selected, the active item will determine the test(s) to run. The active item is the project or project item most recently selected (these items are shown in solution explorer with grey backgrounds). This is basically as Peter suggested.
You can now right click on project items in solution explorer and select run tests(s). This is a quick way to execute tests without opening the source document. The type at the top of the document will be executed as a test fixture. Classes with a 'Main' method rather than a [TestFixture] attribute will be executed as an ad-hoc test.
The TestDriven.NET command names have also changed. They now all start with 'TestDriven.NET.' followed by the short command name. Here are the commands that are most likely to be of interest.
- Client - Build and execute test(s) in a cached external process (this is the default 'Run Test(s)' test runner).
- Solution - Build and execute all tests in the current solution.
- Restart - Restart the last executed test(s).
- Debugger - Build and execute test(s) in the debugger.
- DebugString - Build and execute test(s) showing all OutputDebugStrings (including in spawned app domains and processes).
- DllLoad - Build and execute test(s) showing all Dlls as they load.
- CreateProcess - Build and execute test(s) showing all spawned process and command lines.
- DTE - Build and execute test(s) in the Visual Studio process (the extensibility object is accessible using (DTE)AppDomain.CurrentDomain.GetData("DTE")).
- Abort - Abort the current test run.
- NUnit_GUI - Build and load tests using the NUnit GUI (in an external process).
You will find these fixes in TestDriven.NET RC2