开发者

How can I map some Visual Studio 2010 keybindings to nunit's DEBUG and RUN commands?

Visual Studio has two default keybindings for unit testing :-

CTRL-R then CTRL-T : Debug the current unit test 'context' 
                     (ie where the cursor is currently flashing).

CTRL-R then T : Run the curr开发者_如何学Cent unit test 'context' (as above).

How can I rebind these to use nUnit? Currently, they only support MSTest.

I also have ReSharper installed, if that's any help.

I grab nUnit via NuGet. I don't manually install nUnit via some msi, fwiw.


I got this on Tool -> Options -> Environment -> Keyboard

Theres 2 resharper commands, search for contextrun and assign Ctrl+R, T and for contextdebug and assign Ctrl+R,Ctrl+T


Look in Resharper->Unit Tests menu. There are options to run tests. I use Run All Tests from Solution (Ctrl+R, Ctrl+U - for me R and U stand for Run Unit tests). If You have NUnit Tests it will run them. It will run MSTest tests also.

To change key bindings go to VS2010 menu Tools->Options. Then select Keyboard on left and enter 'runsol' in 'Show commands containing' textbox. Assign Your preferred key binding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜