【问题标题】:Can you run a specific Xcuitest from the command line?您可以从命令行运行特定的 Xcuitest 吗?
【发布时间】:2015-09-27 16:18:01
【问题描述】:

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

谢谢!

【问题讨论】:

标签: ios xcode testing xcode-ui-testing


【解决方案1】:

您应该可以使用xctool 命令行工具来运行特定的测试类,

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

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

【讨论】:

  • 这个工具适合 XCode-UI-Test 吗?我试过了,但我有这个错误:[Info] Loading settings for scheme '....' ...ERROR: build-tests: 'XTests' is not a testing target in this scheme.
  • xctool 不支持 UI 测试根据这个问题:github.com/facebook/xctool/issues/534
猜你喜欢
  • 2015-05-08
  • 1970-01-01
  • 2020-09-03
  • 1970-01-01
  • 2019-04-13
  • 1970-01-01
  • 1970-01-01
  • 2011-05-10
  • 2023-04-03
相关资源
最近更新 更多