ReSharper run all unit tests in a project or solution at once

徘徊边缘 提交于 2019-12-03 23:19:07

问题


I am inside the IDE and I can run all the unit tests in a file but is there any way to run all test in a project or solution at once?


回答1:


Right click on the project or solution in the VS solution-explorer and choose 'Run Unit Tests' Or go to the Resharper menu, choose Unit-Testing and choose one of the options from there.




回答2:


If you learn executing menu commands with Alt-Letters, you can execute many commands fast even if they don't have direct shortcuts. Especially, if shortcuts are two-key combos.

As for running all tests in solution the command is Alt-RUN, i.e. Alt-R for ReSharper menu, U for Unit Testing, and N for all tests in solution.




回答3:


I'm surprised no one mentioned it here, but pretty much all resharper commands can be assigned to specific custom keyboard shortcuts. Go to Tools --> Options --> Keyboard, and find the command you're interested (just type "resharper" in the "show commands containing" text field & you'll find them all). In this specific instance, the "Run All Tests from Solution" command is "ReSharper.UnitTest_RunSolution".

In ReSharper 9.x, the command name is ReSharper.ReSharper_UnitTestRunSolution.




回答4:


Open ReSharper->Windows->Unit Test Explorer and select everything, then hit the run button




回答5:


Sometimes, Resharper won't be able to see the tests until you manually rebuild them. So if you can't see the tests in resharper, or resharper isn't running all the tests in the solution, just rebuild them first.




回答6:


Resharper 7 default shortcut:

Run all tests from solution: Ctrl+U,L




回答7:


It may be that your unit tests are not fully detected within Unit Test explorer. In that case, restarting Visual Studio helped resolve that problem.



来源:https://stackoverflow.com/questions/334933/resharper-run-all-unit-tests-in-a-project-or-solution-at-once

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!