Reputation: 499
I've created cross-platform test using calabash. When I try to test android app I launch: calabash-android run -p android
but calabash tries to run it in phone-simulator. I see iPhone simulator restarting all over again and an error in the console undefined local variable or method `uninstall_apps' for # (NameError)
Also, when I check processes i see there is /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -S cucumber -p android MAIN_ACTIVITY= TEST_APP_PATH= APP_PATH=
iOS tests runs fine, also when I move pages/steps definitions/support files to separate directory, same calabash-android command executes them fine.
So, do you have an idea where can I have an error? I have cucumber.yml set up correctly in config directory.
Upvotes: 1
Views: 97
Reputation: 499
I added env.rb in common support directory with
if ENV['PLATFORM'] == 'ios'
require 'calabash-cucumber/cucumber'
elsif ENV['PLATFORM'] == 'android'
require 'calabash-android/cucumber'
end
class RunState
@@first_run = true
def self.run!
@@first_run = false
end
def self.first_run?
@@first_run
end
end
works
Upvotes: 2