I’d like to add a context menu item to allow me to repeat resharper’s last test run, similar to the one that test driven.net adds. Is this possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I really enjoy TestDriven’s re-run. It’s great for spelunking into a problem, setting breakpoints, running tests, making changes, re-running, etc. If the last time you ran the test you had it “Test with > Coverage” or “Test with > Debugger”, then that’s the setting it uses for repeat.
The closest Resharper comes to that is
Resharper_UnitTest_RunCurrentSessionwhich will run whichever tab is selected in the “Unit Test Sessions” window. It won’t repeat the last test run’s mode (run or debug), or run only the tests from the session that were run the previous time.You can bind a keyboard shortcut to
Resharper_UnitTest_RunCurrentSessionvia Tools > Options… > Environment (section) > Keyboard (section). The full command name isResharper.Resharper_UnitTest_RunCurrentSession.Adding it to the context menu is different for Studio 2008 and Studio 2010, but both get started from Tools > Customize.
Update for R# 6: There is now a
ReSharper.ReSharper_UnitTestSession_RepeatPreviousRuncommand that does exactly what we hope it does.