无法在iOS设备上运行Xamarin应用的Calabash测试

3
我们无法在真实的iPhone上运行部署在Xamarin应用上的Calabash测试。我们已经尝试从以下网址下载示例应用程序: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个回答

0
请确认以下内容:
  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 (首选)和 APP_BUNDLE_PATH 环境变量仅在针对模拟器时使用,当针对实际设备时,它们会被忽略。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接