Visual Studio 2008 – Shortcut Keys for running Unit Tests

Short Cut Keys to Run Tests:

• Ctl R, T: Run Tests in Current context (namespace, class, and method – ie. Based on where your cursor is within a file it determines the tests to run)
• Ctl R, C: Run Tests in Current Test Class
• Ctl R, N: Run Tests in Current Namespace
• Ctl R, S: Run All Tests in Solution
• Ctl R, D: Run the Tests in the Last Test Run
• Ctl R, F: Run the Failed Tests of the Last Test Run

Posted in .Net, C#, Development, Unit Testing by Ben at October 30th, 2008.

2 Responses to “Visual Studio 2008 – Shortcut Keys for running Unit Tests”

  1. Veyix says:

    Is there a keyboard shortcut to open the Test Results window?

  2. Veyix says:

    All of the above with Ctrl held before the second command will run the relevant test in debug mode. eg: Ctrl+R, Ctrl+T will debug the tests in the current context.

    Also, Ctrl+R, A will run ALL tests. (Note: Can be used as Debug too).

Leave a Reply