黄瓜 - 启动器:未附加到自动器 [英] Cucumber - Launcher: not attached to an automator

查看:469
本文介绍了黄瓜 - 启动器:未附加到自动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题正在运行黄瓜。以下是问题的详细信息。你能帮我吗。

I am having issue running cucumber. The below are the issue details. Could you please help me.

Command ::

Command::

cucumber gherkin/pre_login_menu/pre_login_menu.feature -p common_requirements -p ios -p AU_en_ios_3dot4dot6 -p commonBranch_br_2015_2dot0 -p e2sl -p squidman --tags @done_ios DEVICE_TARGET='iPhone 5 (9.2)'

异常::

cannot load such file -- cucumber/formatter/ordered_xml_markup (LoadError)
/Users/username/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
/Users/username/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
/Users/username/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
/Users/username/automation_msl_refactoring/CucumberRequirements/features/support/custom_html_formatter/custom_html.rb:2:in `<top (required)>'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!'
/Users/username/.rvm/gems/ruby-2.0.0-p353/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>'
/Users/username/.rvm/gems/ruby-2.0.0-p353/bin/cucumber:23:in `load'
/Users/username/.rvm/gems/ruby-2.0.0-p353/bin/cucumber:23:in `<main>'
/Users/username/automation_msl_refactoring/CucumberRequirements/features/support/01_launch.rb:148:in `block in <top (required)>': undefined method `simulator_launcher' for #<Launcher: not attached to an automator> (NoMethodError)

XCode和Calabash版本:

XCode and Calabash versions:

   [MACHINESRV:] xcode-select --print-path                                          
   /Applications/Xcode.app/Contents/Developer

   [MACHINESRV:~] xcodebuild -version
   Xcode 7.2.1
   Build version 7C1002

   [MACHINESRV:~] calabash-ios version                                
   0.20.3

   [MACHINESRV:~] curl http://localhost:37265/version                                   

{outcome: SUCCESS,ios_version:9.2,app_id:au.co.service,app_name:AppName,app_base_sdk:iphonesimulator9.2,git:{remote_origin: git@github.com:calabash / calabash-ios-server.git,branch:master,revision:5ec0a54},iOS_version:9.2,simulator_device ,version:0.20.3,server_port:37265,model_identifier:iPhone5,1,form_factor:iphone 4in,app_version:3.7.0,simulator CoreSimulator 201.3 - 设备:iPhone 5 - 运行时:iOS 9.2(13C75) - DeviceType:iPhone 5,4inch:true,iphone_app_emulated_on_ipad:false,device_family:iPhone,screen_dimensions:{ :2,width:640,native_scale:2,sample:1,height:1136},short_version_string:3.7.0,system:x86_64 :iPhone Simulator}

{"outcome":"SUCCESS","ios_version":"9.2","app_id":"au.co.service","app_name":"AppName","app_base_sdk":"iphonesimulator9.2","git":{"remote_origin":"git@github.com:calabash/calabash-ios-server.git","branch":"master","revision":"5ec0a54"},"iOS_version":"9.2","simulator_device":"iPhone","version":"0.20.3","server_port":37265,"model_identifier":"iPhone5,1","form_factor":"iphone 4in","app_version":"3.7.0","simulator":"CoreSimulator 201.3 - Device: iPhone 5 - Runtime: iOS 9.2 (13C75) - DeviceType: iPhone 5","4inch":true,"iphone_app_emulated_on_ipad":false,"device_family":"iPhone","screen_dimensions":{"scale":2,"width":640,"native_scale":2,"sample":1,"height":1136},"short_version_string":"3.7.0","system":"x86_64","device_name":"iPhone Simulator"}

以下是01_launch.rb文件的代码:

require_relative '../support/env' if ENV['isDryRun']
require_relative '../models/runtime'
runtime = Runtime.get_inst

if runtime.is_ios?
  require 'calabash-cucumber/launcher'

  case `whoami`.chomp("\n")
    when 'jcarp5' 
    when 'jenkinsadmin'
     # Jenkins app bundle path
     APP_BUNDLE_PATH="/xxxxxx/Build/Products/Debug-iphonesimulator/CalabashTests.app"
   when 'xxxx'
    APP_BUNDLE_PATH="/Users/xxxxxxxx/Build/Products/Calabash-iphonesimulator/Enterprise.app"
   else
     if ENV['APP_BUNDLE_PATH'] == nil || ENV['APP_BUNDLE_PATH'] == ""
      puts "no appbundlepath"
       raise "You need to set the environment variable APP_BUNDLE_PATH."
    end
end


 Before do |scenario|
   @calabash_launcher = Calabash::Cucumber::Launcher.new

    unless @calabash_launcher.calabash_no_launch?
     @calabash_launcher.relaunch
     @calabash_launcher.calabash_notify(self)
    end
 end

 After do |scenario|
    unless @calabash_launcher.calabash_no_stop?
     calabash_exit
     if @calabash_launcher.active?
      @calabash_launcher.stop
     end
   end
 end

  at_exit do
    launcher = Calabash::Cucumber::Launcher.new
     if launcher.simulator_target?

       launcher.simulator_launcher.stop unless launcher.calabash_no_stop?
     end
  end

end


推荐答案

请阅读错误信息:

support/01_launch.rb:148:in `block in <top (required)>': undefined method `simulator_launcher' for #<Launcher: not attached to an automator> (NoMethodError)

您的第91行中的方法没有定义。

You have method in your 01_launch on line 148 that is not defined.

simulator_launcher 不是Calabash :: Cucumber :: Launcher API的一部分。

simulator_launcher is not part of the Calabash::Cucumber::Launcher API.

向我们显示您的01_launch文件。

Show us your 01_launch file.

这篇关于黄瓜 - 启动器:未附加到自动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆