Like most of us, I learned the following shortcuts from the menu
Figure: VS Run tests menu items with shortcuts
Ctrl+R,T | Run tests in current context |
Ctrl+R,A | Run all tests in solution |
Ctrl+R,Y | Run all impacted tests |
with their corresponding Debug Mode, by using <Ctrl> for the second keystroke. E.g. Ctrl+R,Ctrl+T Debug tests in current context
Today I discovered these additional shortcuts.
I discovered those by changing some shortcuts from using MSTest to TestDriven, as per suggestion from RBanks54 (which rocks BTW, both)
Ctrl+R,N | Run tests in namespace |
Ctrl+R,C | Run tests in class |
Not sure how useful those are, but I tend to scroll through the whole list of shortcuts now and learn some new ones…
Figure: Keyboard options where I found those
Enjoy!
PS
Ctrl+R, F Runs all checked tests (that means tests that failed in the last run, when using MSTest with the GUI)
4 comments:
Interesting, though I'd find it much more useful if there were the possibility to organize tests into "suites" (like in JUnit). Didn't found a way to do that so far.
Btw, did you buy Testdriven.net??
>>Interesting, though I'd find it much more useful if there were the possibility to organize tests into "suites" (like in JUnit).
I use to organise my tests via projects and classes. And give them a meaningful name.
E.g.
Project:Tests.Unit.WCFService
Class: AccountServiceTests
Test: CalculateSalary_NoEmployeeSelected_ReturnError
But you are right categories are quite nice... but not necessary...
>>Btw, did you buy Testdriven.net??
Not yet...
>>I use to organise my tests via projects and classes. And give them a >>meaningful name.
>>E.g.
>>Project:Tests.Unit.WCFService
>>Class: AccountServiceTests
>>Test: CalculateSalary_NoEmployeeSelected_ReturnError
That's fine and an absolute must, otherwise you completely loose control over your test organization. But still I find it an extreme lack of not having the possibility to organize them in categories/suites. Anyway :) the force of habit :)
>>possibility to organize them in categories/suites.
nunit and mbunit have this feature.
xunit and mstest not so far...
lots of people (including me) say its better to make separate test assemblies (=categories)
Post a Comment