Are there shortcut keys for ReSharper's Unit Test Runner?

后端 未结 12 1504
旧时难觅i
旧时难觅i 2021-01-30 12:49

For obvious productivity reasons, I make an effort of learning and using as many of the keyboard shortcuts for the various Re# commands.

However, it seems that the unit

相关标签:
12条回答
  • 2021-01-30 12:57

    I find the easiest way to recall these shortcuts is from the menu:

    Resharper > Unit Tests
    

    All the shortcut keys are presented next to each menu item.

    0 讨论(0)
  • 2021-01-30 13:02

    Sadly, no, but I found this forum post

    There are commands listed in the Tools - Options - Keybaord dialog of VS2008 for resharper unit test runner

    Resharper.Resharper_UnitTest_ContextRun Resharper.Resharper_UnitTest_RunCurrentSession Resharper.Resharper_UnitTest_RunSolution

    Have you tried assigning a keyboard shortcut to these, because I use MSTF and its own test runner, I run all my tests using its shortcut of ctrl r + a, and to run an individual test I either click on the resharper icon (I have Gallio installed) or use test driven.net context menu to run the test.

    0 讨论(0)
  • 2021-01-30 13:03

    You might want to check this short-cut cheatsheet.

    BTW, even if there's no default key, you can probably bind one by going to the menu Tools->Options, and then to the sub-category General->Keyboard, and typing ReSharper in the search line.

    0 讨论(0)
  • 2021-01-30 13:09

    You could try ... ALT R U R
    - if your cursor is in the Test method, then R# just runs that test
    - if its in a test class, but not a method, R# runs all the tests in the class

    0 讨论(0)
  • 2021-01-30 13:12

    I know this is an old question but it's the top SO question on the Google results for the topic, so adding, just in case.

    With Resharper V6, it starts with some keyboard mappings setup out of the box:

    http://blogs.jetbrains.com/dotnet/2011/08/new-features-in-resharper-6-unit-test-runner/

    0 讨论(0)
  • 2021-01-30 13:13

    RunCurrentSession command

    You can collect your tests in a test session tab of Unit Test Sessions window. Then you can run all these tests by running command *ReSharper.ReSharper_UnitTest_RunCurrentSession*. *ReSharper.ReSharper_UnitTest_RunCurrentSession* command is assigned to Ctrl+R, Ctrl+U in my Visual Studio.

    0 讨论(0)
提交回复
热议问题