If you are using TDD in Microsoft Visual Studio 2010 and apply that red – green – refactor thingie, you want your tests to execute as fast as possible. Well MSTEST in Microsoft Visual Studio 2010 is known to be a snail, so for TDD in Microsoft Visual Studio 2010 you probably want to use external tools like ReSharper, TestDriven.Net etc.
To further improve the speed I reassign the keyboard shortcuts:
- CTRL + Q to run the current test(s) in context without debugger.
- CTRL + W to run the current test(s) in context with debugger.
- By the way, in Microsoft Visual Studio 2012 there is a tremendous performance improvement in running unit test, so you might want to look at that.
- An other tip: don’t use CTRL + S (to save code), instead use CTRL + Q to save, compile and run tests on your code at once.