gpt4 book ai didi

ios - 葫芦-ios : Run test physical device installed ipa without xcodeproj

转载 作者:行者123 更新时间:2023-11-29 01:36:56 27 4
gpt4 key购买 nike

我是 calabash-ios 的新手,有一个虚拟问题是:

我怎么可能用安装了 ipa 文件(包括 calabash 框架)但没有 xcodeproj 的真实设备运行 calabash 测试?

问题是我正在做 QA,Dev 只给我 ipa 文件进行测试,没有源代码。

更新:我可以通过添加 BUNDLE_ID 在控制台和 cucumber 中运行 ipa 文件。并确保 CFNetwork.framework 包含在应用程序框架中以建立连接。

但是我在运行场景时遇到了另一个问题:1. 当我运行下面的命令时:

DEVICE_ENDPOINT=http://192.168.1.9:37265 NO_LAUNCH=1 BUNDLE_ID=com.example.appname DEVICE_TARGET=UDID cucumber

然后我得到这个错误:

 A JSON text must at least contain two octets! (JSON::ParserError)
features/my_first.feature:8:in `Then I touch "LOG-IN/ CREATE ACCOUNT"'

跳过所有其他步骤

  1. 然后我运行控制台代码

    DEVICE_ENDPOINT=http://192.168.1.9:37265 NO_LAUNCH=1 BUNDLE_ID=com.example.appname DEVICE_TARGET=UDID calabash-ios console

然后我运行 server_version我收到回复说连接成功但是当我运行 start_test_server_in_background我等得太久了,我看到我的物理设备上的应用程序一直崩溃并一次又一次地启动,直到它停止为:

Unable to start. Make sure you've set APP_BUNDLE_PATH to a build supported by this simulator version
Calabash::Cucumber::Launcher::StartError: Calabash::Cucumber::Launcher::StartError:

"Timed out waiting for UIAutomation run-loop Error while writing to fifo. RunLoop::Fifo::NoReaderConfiguredError.
2015-10-01 10:49:41.634 instruments[15640:10558880] WebKit Threading Violation - initial use of WebKit from a secondary thread.
2015-10-01 10:49:42.574 instruments[15640:10558978] Attempting to change event horizon while disengage
2015-10-01 10:49:42.577 instruments[15640:10558877] Attempting to change event horizon while disengage
Instruments Trace Error : Target failed to run: Permission to debug app

任何人都可以帮忙!我试图搜索一些解决方案,但它们几乎是在模拟器上发布的,并且它们包含 xcodeproj。作为 QA,我没有源代码,只有 .ipa 文件。 :(谢谢

最佳答案

您应该设置 3 个变量:

$ DEVICE_TARGET=<UDID> \
DEVICE_ENDPOINT=http://<ip>:37265 \
BUNDLE_ID=com.example.YourApp cucumber

设备和主机应该在同一个网络上。

.ipa 必须安装在您的设备上。

您可以在 Xcode 中通过在设备管理器窗口中拖放或使用第三方工具(如 ideviceinstaller(可用于自制软件))来执行此操作。

永远不要设置NO_LAUNCH

http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-NO_LAUNCH

您还需要启用您的设备进行开发,并在 Settings.app > Developer 中打开 UIAutomation。

  1. > Enabling device for development
  2. > RunLoop::Fifo::NoReaderConfiguredError

更新 针对这个问题,我重写了 Testing on Physical Devices Calabash iOS 维基页面。哇,那内容太古老了!

关于ios - 葫芦-ios : Run test physical device installed ipa without xcodeproj,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32859217/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com