Is there a keyboard shortcut in Xcode 6 to run a single current test function under cursor?

XcodeUnit TestingSwift

Xcode Problem Overview


Is there a keyboard shortcut in Xcode 6 to run the current test case under cursor? I know I can press Command + u to 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 shortcut to run only the single test function under cursor?

Xcode Solutions


Solution 1 - Xcode

Run the current test:

Control + Option + Command + U

Re-Run the last test:

Control + Option + Command + G

Solution 2 - Xcode

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 ;)

Solution 3 - Xcode

The Xcode key binding preferences for these commands are:

  • Perform Action - Test

  • Perform Action - Test Again

Use those titles to find the commands for re-binding.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEvgeniiView Question on Stackoverflow
Solution 1 - XcodesbstjnView Answer on Stackoverflow
Solution 2 - XcodePlastechView Answer on Stackoverflow
Solution 3 - XcodepkambView Answer on Stackoverflow