你能从命令行 运行 一个特定的 Xcuitest 吗?

Can you run a specific Xcuitest from the command line?

使用 iOS 9.0,Xcode GM 和新的 Xcuitesting 框架。如何从命令行 运行 进行特定测试,而不必在 ide 中单击播放?我知道 运行 所有测试都有一个捷径,但我想 运行 一个测试。

谢谢!

您应该可以使用 xctool 命令行工具进行 运行 宁特定测试 class,

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

您还可以使用 xcodebuild 来 运行 整个测试套件,如此处所述, https://krausefx.com/blog/run-xcode-7-ui-tests-from-the-command-line