Can you run a specific Xcuitest from the command line?
Asked Answered
D

1

9

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!

Demigod answered 27/9, 2015 at 16:18 Comment(1)
something new about this issue? I've the same problem: #34794231Circumlocution
O
6

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

Orthotropous answered 4/10, 2015 at 6:42 Comment(2)
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.Circumlocution
xctool doesn't support UI tests according to this issue: github.com/facebook/xctool/issues/534 .Burin

© 2022 - 2024 — McMap. All rights reserved.