gpt4 book ai didi

ios - 无法在 iOS 设备上为 Xamarin 应用程序运行 Calabash 测试

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:37:45 25 4
gpt4 key购买 nike

我们无法让 Calabash 测试在部署到真实 iPhone 的 Xamarin 应用程序上运行。我们已尝试从以下位置下载示例应用程序:

http://developer.xamarin.com/guides/testcloud/calabash/introduction-to-calabash/

它在部署到模拟器时有效,但在尝试真实设备时无效。我们可以在设备上安装和运行,只是不能让它与 Calabash 一起工作。

我们尝试运行它的命令是:

APP_BUNDLE_PATH=~/Path/to/CreditCardValidation-Calabash/CreditCardValidation.iOS/bin/iPhone/Debug/CreditCardValidationiOS-1.0.ipa DEBUG=1 BUNDLE_ID=com.xamarin.calabash.example.creditcardvalidation DEVICE_TARGET=uuid-of-device DEVICE_ENDPOINT=http://ip.of.phone:37265 RESET_BETWEEN_SCENARIOS=1 cucumber

上面的输出是:

Using the iOS profile...

Feature: Navigation feature


@ios_only

Scenario: A user can navigate between each journey stage # features/navigation.feature:4


INFO: Using uia strategy: 'preferences'

Preparation took 0.087536 seconds

{

:app => "<snip>",

:args => [],

:bundle_dir_or_bundle_id => "<snip>",

:bundle_id => "<snip>",

:device => "<snip>",

:device_target => "<device-uuid>",

:launch_method => :instruments,

:launch_retries => 5,

:log_file => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/run_loop.out",

:no_launch => false,

:no_stop => false,

:reset => true,

:results_dir => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00",

:results_dir_trace => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/trace",

:script => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/_run_loop.js",

:sdk_version => nil,

:udid => "<device-uuid>",

:uia_strategy => :preferences,

:xcode => "6.0.1",

:xcode_path => "/Applications/Xcode.app/Contents/Developer"

}


### Starting on <device-uuid> App: <snip> ###

2014-11-07 11:21:38 +0000 xcrun instruments -w "<device-uuid>" -D "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/trace" -t "Automation" "<snip>" -e UIARESULTSPATH /var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00 -e UIASCRIPT /var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/_run_loop.js &> /var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/run_loop.out

Failed to launch.

execution expired: execution expired

Running `curl http://ip.of.phone:37265/version` returns the expected json.

最佳答案

你能检查以下内容吗:

  1. 通过 USB 连接设备。
  2. 确保包标识符与应用程序的包标识符匹配。
  3. 设备是否出现在 xcrun instruments -s devices 的输出中?如果没有检查 Xcode 的设备窗口(Command + Shift + 2)。确保设备已列出并且没有出现任何警告。如果出现错误,请退出 Xcode,重新启动设备,然后重新启动 Xcode。冲洗并重复,直到错误被清除。有时我必须将我的设备连接到另一台机器才能清除警告。
  4. 设备上是否安装了该应用程序? Calabash 无法在物理设备上安装应用程序。参见 this project演示如何使用 ideviceinstaller 在设备上安装应用程序作为 Calabash 测试的一部分。我添加了一个 TODO 来改进该项目的 README.md。

APP_BUNDLE_PATH=~/Path/to/CreditCardValidation-Calabash/CreditCardValidation.iOS/bin/iPhone/Debug/CreditCardValidationiOS-1.0.ipa

APP (preferred) and APP_BUNDLE_PATH环境变量仅在针对模拟器时使用。当以物理设备为目标时,它们会被忽略。

关于ios - 无法在 iOS 设备上为 Xamarin 应用程序运行 Calabash 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26801262/

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