找不到匹配'模拟器'的模拟器(RuntimeError)

时间:2014-11-05 17:43:00

标签: ios cucumber ios-simulator calabash

在ios模拟器(iPhone5 os = 8)上通过Calabash运行我的Cucumber测试时遇到奇怪的错误。我的步骤全部通过,但情况最终失败。我一直在寻找悬而未决的期望,无法想出任何罪魁祸首。场景正确地通过其在模拟器中的步骤并适当地执行所有命令,但场景失败。当我使用--format运行Scenario时,我得到了这个

Could not find a simulator that matches 'simulator' (RuntimeError)
  /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.3/lib/calabash-cucumber/launcher.rb:267:in `reset_app_sandbox'
  /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.3/lib/calabash-cucumber/launcher.rb:565:in `relaunch'
  /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.3/lib/calabash-cucumber/core.rb:838:in `start_test_server_in_background'

〜/ features / media_mobile / helpers / ios / support / app_life_cycle_hooks.rb:43:在`之前'

  Could not find a simulator that matches 'simulator' (RuntimeError)
  /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.3/lib/calabash-cucumber/launcher.rb:267:in `reset_app_sandbox'
  /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.3/lib/calabash-cucumber/launcher.rb:565:in `relaunch'
  /Library/Ruby/Gems/2.0.0/gems/calabash-cucumber-0.11.3/lib/calabash-cucumber/core.rb:838:in `start_test_server_in_background'

〜/ features / media_mobile / helpers / ios / support / app_life_cycle_hooks.rb:43:在`之前'

失败的场景: cucumber -p ios功能/ login1.feature:26#场景:登录

1个场景(1个失败) 9个步骤(9个通过)

不确定发生了什么。任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:0)

尝试使用此命令指定模拟器

PLATFORM=iphone DEVICE_TARGET='iPhone 5s (7.1 Simulator)' APP_BUNDLE_PATH=users/.../build/Staging-iphonesimulator/your_app-cal.app cucumber -v --format html --out iphone.html $DIR_PATH/features/*.feature

如果您使用默认的派生数据文件夹,请根据您的需要指定ios版本和APP Bundle路径跳过应用程序包路径。