I’m constantly clicking “Repeat Test Run” or “Run Tests” inside of of the VS 2005 IDE. Yes, I’m willing to admit that I’m a firm believer in going commando when it comes to the mouse. Its just, well, too time consuming. On average, I would normally right-click “Repeat Test Run” or “Run Tests” hundreds of times. This got real old. So I created a keyboard shortcut in Visual Studio.
Some people see me use this and have asked how to do this. Unfortunatley I thought this was a basic thing to know, but apparently its not (at least from the circles that I’ve run with).
So here’s how to do it.
In Visual Studio, go to Tools, Options
Then go to Environment, Keyboard.
Type in “TestDriven” into the Commands Containing window. Select “TestDriven.NET.RunTests” command. Then place your cursor into the “Presss shortcut keys” textbox. Then hit the follow keys: Hold down the CTRL button and then press (while holding down CTRL) R and then release R and then press T (while still HOLDING the CTRL button). This will produce: CTRL + R, CTRL + T. Click assign, and OK and you’re done!
Now, inside of your test code, method or class, hit the keyboard shortcut. Hold down CTRL while pressing R and then T. CTRL + R, CTRL + T.
The test will run. You can also apply this to other items such as “Repeat Test Run” and many others. ๐
Leave a Reply
You must be logged in to post a comment.