当我尝试运行我的测试套件时,我收到此错误:
uninitialized constant Calabash::Cucumber::VERSION (NameError)
/Users/Dexter/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:1041:in `check_server_gem_compatibility'
/Users/Dexter/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:645:in `relaunch'
/Users/Dexter/Work/mobile-calabash-test/features/ios/support/01_launch.rb:55:in `Before'
在运行测试套件之前,这些是我的路径:
export APP=prebuilt/ios/Build/Products/Debug-iphonesimulator/leeo-cal.app
export APP_BUNDLE=$APP
cucumber -p ios
这是我的config.yml
ios: PLATFORM=ios -r features/support -r features/ios/support
这是Before
01_launcher.rb
Before do |scenario|
scenario_tags = scenario.source_tag_names
reset_between_scenario = !scenario_tags.include?('@tandem_scenario')
if reset_between_scenario
if LaunchControl.target_is_simulator?
target = LaunchControl.target
simulator = RunLoop::Device.device_with_identifier(target)
bridge = RunLoop::Simctl::Bridge.new(simulator, ENV['APP'])
bridge.reset_app_sandbox
else
LaunchControl.install_app_on_physical_device
end
end
launcher = Calabash::Cucumber::Launcher.launcher
unless launcher.calabash_no_launch?
launcher.relaunch
launcher.calabash_notify(self)
end
end
我不确定发生了什么。文件未正确加载吗?
这是01_launch.rb
文件的要点:https://gist.github.com/DexterV/94b0853e8f784171adce