TestDriven.Net Keyboard Shortcuts

TestDriven.Net is a Visual Studio add-in to help with testing in general and TDD in particular. It allows the user to run a test or group of tests by right-clicking and selecting 'Run Test(s)' from the context menu.

Context Menu

When I started using TestDriven.Net I used the Shift+F10 keyboard combination to access the context menu so that I did not have to take my hands off the keyboard to run a test. That was until Steve suggested setting up TestDriven.Net keyboard shortcuts in Visual Studio. He suggested two shortcuts:

TestDriven.NET Keyboard Shortcuts
Shortcut Name Shortcut Key Combination Description
TestDriven.NET.RunTests Ctrl+Shift+Alt+T This is the equivalend of right-click => Run Test(s).
TestDriven.NET.RerunTests Ctrl+Shift+Alt+R This is a very handy shortcut that runs the last tests run. You can run a test, make a code change, and then rerun the last test without taking the cursor back to it.


To setup shortcuts in Visual Studio 2008 use the 'Keyboard' settings group in options. Entering 'TestDriven' in the 'Show commands containing' text box will filter the list of shortcuts to just those relating to TestDriven.Net. Then find TestDriven.NET.RerunTests, place your cursor in the 'Press shortcut keys' text box, enter the key combination of your choice and click 'Assign'. Same process for TestDriven.NET.RunTests. Of course there are many other shortcuts you can configure, such as RunWithCoverage, if you're into that.

TestDriven keyboard shortcuts

 


Comments

Comments are closed