8

Playing with iOS 9.0, Xcode GM and the new Xcuitesting framework. How can I run a specific test from the command line instead of having to click play in the ide? I know there's a shortcut to run all the tests but I want to run a single test.

Thanks!

Senseful
  • 86,719
  • 67
  • 308
  • 465
Joe Susnick
  • 6,544
  • 5
  • 44
  • 50
  • something new about this issue? I've the same problem: http://stackoverflow.com/questions/34793731/xcode-ui-test-can-i-specify-a-particular-test-that-i-want-to-run-from-terminal – emoleumassi Jan 28 '16 at 12:29

1 Answers1

5

You should be able to do that with xctool command line tool for running specific test class,

xctool -workspace YourWorkspace.xcworkspace -scheme YourScheme test -only myUITestTarget:UITestClass

You can also use xcodebuild to run the entire test suite as explained here, https://krausefx.com/blog/run-xcode-7-ui-tests-from-the-command-line

Sushant
  • 440
  • 3
  • 8
  • 1
    is this tool appropriate for the XCode-UI-Test? I tried it but i have this error: [Info] Loading settings for scheme '....' ...ERROR: build-tests: 'XTests' is not a testing target in this scheme. – emoleumassi Jan 28 '16 at 12:28
  • 2
    `xctool` doesn't support UI tests according to this issue: https://github.com/facebook/xctool/issues/534 . – brigadir Mar 10 '16 at 15:41