Xcode 6 中是否有键盘快捷键可以在光标下运行单个当前测试功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28057643/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a keyboard shortcut in Xcode 6 to run a single current test function under cursor?
提问by Evgenii
Is there a keyboard shortcut in Xcode 6 to run the current test case under cursor? I know I can press Command+ uto run all tests. Also, I can tap the test icon located to the left of the test function or tap the icon in 'Test Navigator'. Is there a keyboard shortcutto run only the single test function under cursor?
Xcode 6 中是否有键盘快捷键可以在光标下运行当前测试用例?我知道我可以按Command+ u运行所有测试。此外,我可以点击位于测试功能左侧的测试图标或点击“测试导航器”中的图标。是否有仅运行光标下的单个测试功能的键盘快捷键?
回答by sbstjn
Run the current test:
运行当前测试:
Control+ Option+ Command+ U
Control+ Option+ Command+U
Re-Run the last test:
重新运行上次测试:
Control+ Option+ Command+ G
Control+ Option+ Command+G
回答by Plastech
control-option-command G
will let you rerun your last test. So if you run a single test the first time and then keep running it (a common workflow for TDD), that might save you some time ;)
control-option-command G
会让您重新运行上次测试。因此,如果您第一次运行单个测试然后继续运行它(TDD 的常见工作流程),那可能会为您节省一些时间;)
回答by pkamb
The Xcode key binding preferences for these commands are:
这些命令的 Xcode 键绑定首选项是:
Perform Action - Test
Perform Action - Test Again
执行操作 - 测试
执行操作 - 再次测试
Use those titles to find the commands for re-binding.
使用这些标题来查找重新绑定的命令。