iOS 设备上不支持逻辑测试?

发布于 2024-12-20 15:34:56 字数 126 浏览 3 评论 0原文

我正在使用 SenTestingKit 进行单元测试,但收到以下消息

不支持 iOS 设备上的逻辑测试。您可以在模拟器上运行逻辑测试。

我该怎么做?

I am using the SenTestingKit to Unit Test, but I get the following message

Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.

How can I do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

暗喜 2024-12-27 15:34:56

您需要有一个主机应用程序

在此处输入图像描述

请注意,该图像指向测试目标配置的常规选项卡。

You need to have a Host Application

enter image description here

Note that the image is pointing to the General tab of Test target's configurations.

鹊巢 2024-12-27 15:34:56

逻辑测试只能在模拟器上进行,需要切换到模拟器,即

在此处输入图片描述

逻辑测试需要特殊的单元测试启动器未安装在实际设备上。

如果您想在实际设备上运行测试,您可以转换为应用程序单元测试。这些本质上是相同的,但是您的应用程序首先启动(作为“主机”),并且您的测试与它们一起运行。这意味着您的测试可以在您的应用程序支持的任何设备上运行。唯一的缺点是您的实际应用程序将运行,这可能会干扰您的测试,特别是如果您使用大量通知。

Logic tests only work on the simulator, you need to switch to the simulator, i.e.

enter image description here

Logic tests require a special unit test launcher which is not installed on actual devices.

If you want to run your tests on an actual device you can convert to application unit tests. These are essentially the same but you application gets launched first (as a 'host') and your tests get run along side them. This means your tests can run on any device that your application supports. The only disadvantage is that your actual app will be running which can interfere with your test, especially if you use a lot of notifications.

秋叶绚丽 2024-12-27 15:34:56

我们必须仅通过 webdriverAgrentRunner 在 cxode 中构建和测试我们的项目。选择真实设备:webdriverAgentRuuner>>设备名称

we have to build and test our project in cxode only through webdriverAgrentRunner. select real device : webdriverAgentRuuner>>device name

玩套路吗 2024-12-27 15:34:56

如果您问自动化测试这个问题,那么“是的,您必须将 WebDriverAgentRunner 更改为真实设备并再次运行测试”。错误将会消失

If you are asking this question for Automation testing then "YES, you have to change the WebDriverAgentRunner to a Real device and run the test again". The error will be disappeared

默嘫て 2024-12-27 15:34:56

全龙的回答是正确的,但没有描述细节。以下是在真实设备上测试框架所需的步骤:

  1. 单击目标列表下的 + 号并添加“应用程序”类型的目标。 “TestHost”是个好名字。

  2. 测试目标的“常规”选项卡下,添加 TestHost 作为“主机应用程序”

  3. TestHost 目标的“常规”选项卡下,将框架本身添加到“框架、库和嵌入内容”列表

  4. 如果框架使用 Pod,请编辑 Podfile,添加 < em>target 'TestHost'do 部分并确保所有 pod 也安装到 TestHost 目标中

Quanlong's answer is correct, but it doesn't describe the details. Here are the needed steps in order to test a framework on a real device:

  1. Click the + sign under the list of targets and add a target of type "Application". "TestHost" is a good name.

  2. Under the General tab of the Tests target, add TestHost as the "Host Application"

  3. Under the "General" tab of the TestHost target, add the framework itself to the list of "Frameworks, Libraries and Embedded Content"

  4. If the framework uses Pods, edit the Podfile, add a target ‘TestHost’ do section and make sure all pods are also installed into the TestHost target

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文