繁体   English   中英

Calabash-ios,运行黄瓜时无法启动.ipa文件

[英]Calabash-ios, can't launch .ipa file when running cucumber

尝试在物理设备上启动.ipa文件时遇到困难。

在控制台中,我能够启动应用程序并按下不同的按钮等。因此,我认为我已正确设置了所有内容。 我也将.ipa文件放在运行黄瓜的目录中。

[**********@calabash-sandbox]$ cucumber
Feature: test Feature

  Scenario: test Scenario            # features/test.feature:3
  Recursively searched these directories to depth 5:

  /Users/********/features

  but could not find any .app for the simulator that links the Calabash iOS server.

  Make sure you have built your app for a simulator target from Xcode.

  If you are testing a stand-alone .app (you don't have an Xcode project), put
  your .app in the same directory (or below) the directory you run `cucumber` from.
   (RunLoop::NoSimulatorAppFoundError)
  ./features/support/01_launch.rb:27:in `Before'
    Given the app has launched       # features/test.feature:4
    And I have done a specific thing # features/test.feature:5
    When I do something              # features/test.feature:6

Heading
=======

    Then something should happen     # features/test.feature:7

Failing Scenarios:
cucumber features/test.feature:3 # Scenario: test Scenario

1 scenario (1 failed)
4 steps (4 undefined)
0m0.171s

我正在使用的ipa文件是独立文件,而不是通过xcode构建的。 该应用程序上的calabash框架版本和我的calabash-ios版本是相同的0.19.0,

以下是01_launch.rb,我认为这是标准的

require 'calabash-cucumber/launcher'

# You can find examples of more complicated launch hooks in these
# two repositories:
#
# https://github.com/calabash/ios-smoke-test-app/blob/master/CalSmokeApp/features/support/01_launch.rb
# https://github.com/calabash/ios-webview-test-app/blob/master/CalWebViewApp/features/support/01_launch.rb

module Calabash::Launcher
  @@launcher = nil

  def self.launcher
    @@launcher ||= Calabash::Cucumber::Launcher.new
  end

  def self.launcher=(launcher)
    @@launcher = launcher
  end
end

Before do |scenario|
  launcher = Calabash::Launcher.launcher
  options = {
    # Add launch options here.
  }

  launcher.relaunch(options)
  launcher.calabash_notify(self)
end

After do |scenario|
  # Calabash can shutdown the app cleanly by calling the app life cycle methods
  # in the UIApplicationDelegate.  This is really nice for CI environments, but
  # not so good for local development.
  #
  # See the documentation for NO_STOP for a nice debugging workflow
  #
  # http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-NO_STOP
  # http://calabashapi.xamarin.com/ios/Calabash/Cucumber/Core.html#console_attach-instance_method
  unless launcher.calabash_no_stop?
    calabash_exit
  end
end

不用说我是新来的葫芦,任何帮助将不胜感激

为了在物理设备上测试.ipa,需要首先在设备上安装ipa。

我们在CalSmokeApp中有一些示例代码,展示了如何使用ideviceinstaller在物理设备上安装ideviceinstaller

您还应该看到“ 在物理设备上测试”维基页面。

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

有关xcode的所有信息,请确保您已经通过xcode在模拟器上进行了构建(如果已经显示了模拟器),然后运行Cucumber

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM