本文介绍了当前未针对测试操作配置Xcode项目方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的iOS应用程序运行Xcode单元测试。我愿意在通过USB连接到Mac的iPad上进行操作。我正在尝试从命令行运行测试,以便稍后从Jenkins触发该测试。

I am trying to run an Xcode unit test for my iOS application. I am willing to do it on an iPad connected via USB to a Mac. I am trying to run the test from the command line in order to trigger it from Jenkins later on.

下面是我当前在命令行中输入的内容,我得到的错误。请帮忙。

Below is what I'm currently typing into the command line and the error I'm getting. Please help.

代码:

xcodebuild test -scheme MyApplication -destination "platform=iOS,name=iPad"

错误:


推荐答案

对我来说,问题是我的计划中未添加任何测试:

For me the problem was that no tests were added to my scheme:

通过通过 +按钮向我的方案中添加测试包,然后可以由Xcode和xcodebuild构建该方案。

By adding test bundles to my scheme via the '+' button then the scheme could be built by Xcode and xcodebuild.

这篇关于当前未针对测试操作配置Xcode项目方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 03:31