iOS模拟器不会与Calabash一起启动

Jam*_*est 1 calabash calabash-ios

我在项目中将Calabash安装为pod.gem本身是使用bundler安装的.当我尝试为我的Calabash目标运行黄瓜时,第一个功能启动,但只是挂起,模拟器永远不会启动:

$ bundle exec cucumber
Feature: Ensure Login and Oauth Screen Functionality

  Scenario: Verify Welcome Page                 # features/Sign_in.feature:3
Run Code Online (Sandbox Code Playgroud)

我安装的更多细节:

# xcode installation location
$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

# xcode version
$ xcodebuild -version
Xcode 5.1.1
Build version 5B1008

# calabash version
$ bundle exec calabash-ios version
0.9.168

# calabash < 0.9.169 or Xamarin IDE users
# start your app manually in the simulator or from Xcode and then launch a console
$ bundle exec calabash-ios console
> server_version
{
                        "outcome" => "SUCCESS",
                         "app_id" => "[REDACTED]",
               "simulator_device" => "iPhone",
                        "version" => "0.9.168",
                       "app_name" => "[REDACTED]",
    "iphone_app_emulated_on_ipad" => false,
                          "4inch" => true,
                            "git" => {
        "remote_origin" => "git@github.com:jmoody/calabash-ios-server.git",
               "branch" => "master",
             "revision" => "adde106"
    },
                    "app_version" => "2.0.1",
                    "iOS_version" => "7.1",
                         "system" => "x86_64",
                      "simulator" => "iPhone Simulator 463.9.41, iPhone OS 7.1 (iPhone Retina (4-inch)/11D167)"
}
Run Code Online (Sandbox Code Playgroud)

Cha*_*ara 5

好的,这意味着葫芦无法找到您的应用.

先试一下,

  1. 在YourProject/features/support/01_launch.rb上注释掉APP_BUNDLE_PATH定义,#APP_BUNDLE_PATH = "~/..../../myApp-cal.app" 这样calabash gem可以自动定位应用程序.
  2. 打开控制台,从中转到项目文件夹.然后输入gem install calabash-cucumber这将安装calabash gem它可以再次运行,即使你以前安装它没有任何伤害.然后进入calabash-ios setup该终端,这将创建一个calabash目标并将calabash框架添加到您的iOS项目中.有关设置过程的更多详细信息,请参见此处.
  3. 现在在xcode编辑器中打开项目文件(您可以看到calabash.framework已成功添加到项目的框架组中.)选择yourApp-cal目标和要清理的模拟器,在模拟器上构建并运行yourApp-cal目标.
  4. 然后停止它并返回到控制台进入calabash-ios console控制台将启动一个ruby控制台,您可以使用该应用程序.现在(虽然模拟器在你的屏幕上,但你的应用程序是在该模拟器上的backbround)键入start_test_server_in_background你的应用程序必须来到前台.如果可行的话,葫芦可以在模拟器上找到并运行你的应用程序.
  5. 请记住,只有使用xcodebuild命令或脚本或其他东西在单独的文件夹上创建应用程序构建时,才能设置APP_BUNDLE_PATH变量.