WowKhmer Tech

Samnang Chhun - Gravatar

About the author: Samnang Chhun. I develop software for my living and hobby. I feel blessed to have been able to enter a profession that I love. I love being able to share my enthusiasm and knowledge with other guys.

Shortcut keys for your favorite test runner(TestDriven.Net, Resharper)

Recently, I have spent some time for reading and practicing on small exercises by using TDD for solving the problems. While I was writing more and more tests, I needed to run it more often. Then I realize I am annoyed every time I want to run the current test method, I need to stop from the keyboard and lift my hand to the mouse for running it from the context menu. It’s a kind of less productivity and not be a professional. After that, I found the way how to assign shortcut keys for our favorite unit-test runner like TestDriven.NET and Resharper:

  • In Visual Studio, Go to “Tools –> Options”
  • Select “Environment –> Keyboard”
  • In the “Show command containing:” text box, enter your unit-test runner like “TestDriven” or “Resharper_UnitTest”:
    For my personal I have assigned some shortcut keys on:

    • TestDriven.NET.RunTests –> (Ctrl+R, Ctrl+T)
    • TestDriven.NET.Debugger –> (Ctrl+R, Ctrl+D)
    • TestDriven.NET.Debugger –> (Ctrl+R, Ctrl+D)
    • TestDriven.NET.RerunTests –> (Ctrl+R, Ctrl+R)
    • Resharper.Resharper_UnitTest_ContextRun –> (Ctrl+R, Ctrl+N)
    • Resharper.Resharper_UnitTest_RunSolution –> (Ctrl+R, Ctrl+S)

    Assign shortcut for Testdriven.net

  • Click the “Press shortcut keys:” text box. Now press the the shortcut key to be assigned for running your tests and click the Assign button.
  • Don’t forget to set “Use new shortcut in:” to “Text Editor”.

I hope it’s useful for Test Driven Developers who want to get away from using mouse.

http://tech.wowkhmer.com/wp-content/plugins/sociofluid/images/digg_48.png http://tech.wowkhmer.com/wp-content/plugins/sociofluid/images/dzone_48.png http://tech.wowkhmer.com/wp-content/plugins/sociofluid/images/delicious_48.png http://tech.wowkhmer.com/wp-content/plugins/sociofluid/images/technorati_48.png http://tech.wowkhmer.com/wp-content/plugins/sociofluid/images/facebook_48.png http://tech.wowkhmer.com/wp-content/plugins/sociofluid/images/twitter_48.png

1 person has left a comment

Dan - Gravatar

Dan said:

Very nice, I was looking for these shortcuts.
I too use R# and I prefer the keyboard over the mouse.

Posted on: March 8, 2010 at 12:20 amQuote this Comment

Commentors on this Post-

Leave a Comment-

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs are automatically generated. Off-topic or inappropriate comments will be edited or deleted. Email addresses will never be published. Keep it PG-13 people!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

All fields marked with "*" are required.