2017-10-05 59 views
0

開始自動啓動的iOS當我運行測試,我寫在控制檯以下錯誤:錯誤的X平臺蠡

undefined method `split' for nil:NilClass (NoMethodError) 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/run_loop 1.2.6/lib/run_loop/sim_control.rb:866:in `block in sim_details' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/run_loop-1.2.6/lib/run_loop/sim_control.rb:863:in `each' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/run_loop-1.2.6/lib/run_loop/sim_control.rb:863:in `sim_details' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/run_loop-1.2.6/lib/run_loop/sim_control.rb:290:in `enable_accessibility_on_sims' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/run_loop-1.2.6/lib/run_loop/core.rb:214:in `run_with_options' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/run_loop-1.2.6/lib/run_loop/core.rb:792:in `run' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/calabash-cucumber-0.12.2/lib/calabash-cucumber/launcher.rb:755:in `block in new_run_loop' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/calabash-cucumber-0.12.2/lib/calabash-cucumber/launcher.rb:753:in `times' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/calabash-cucumber-0.12.2/lib/calabash-cucumber/launcher.rb:753:in `new_run_loop' 
    /Users/denis/.rvm/gems/ruby-2.1.1/gems/calabash-cucumber-0.12.2/lib/calabash-cucumber/launcher.rb:624:in `relaunch' 
    /Users/denis/Documents/calabash-test-ios/x-platform-example/features/ios/support/01_launch.rb:27:in `Before' 

測試本身就是從這裏開始的example。下面是錯誤的一個代碼:

​​3210

運行以下命令:bundle exec cucumber -p ios DEVICE_TARGET="6D45E1...6513"

誰能遇到?

+0

你可以包含導致上述錯誤的代碼? –

+0

@ChuckvanderLinden添加代碼 –

回答

0

DEVICE_TARGET UUID是否確實存在於可用模擬器列表中? instruments -s會顯示設備。切換Xcode版本並且不重新啓動或重新啓動CoreSimulator服務可能導致找不到模擬器。

+0

DEVICE_TARGET UUID實際上是 –

0

看起來像這樣的代碼sdk_version = elm[/(\d\.\d(\.\d)? Simulator)/, 0]沒有返回任何東西。看起來你期待它返回一個字符串。我會在該區域進行調試。

錯誤是告訴你,你的選擇導致了一個無對象,當然沒有類,也沒有.split方法。因此,試圖調用.split方法的結果是給出了錯誤信息,即您沒有定義.split方法。