2

I have a Android device connected to my PC. Running a calabash test I use the following command:

calabash-android run <NAME>.apk features/<NAME>.feature

Now before running a feature Calabash always uploads the application again witch takes time.

How can I disable this?

Any help would be appreciated!

Thank you!

lony
  • 6,733
  • 11
  • 60
  • 92
  • Could you please split your question up into multiple posts. You'll get answers for your problems faster and it'll be easier for people to find useful information in the future. – alannichols Apr 30 '15 at 09:18

1 Answers1

4

You can control the reinstallation of the app using the hooks file. This contains the cucumber hooks for before and after scenario. If you didn't make the hooks file that you are running then it's probably one from a sample project.

The bit you're looking for is the 'reinstall_apps' command. If you remove it completely then your app won't ever be reinstalled, which can be a bad thing as it's sometimes necessary to reset the app completely. The way I handle it is to tag the features where I do want the app reinstalled with @reinstall_app and then

Before do |scenario|
  puts "Starting scenario - #{scenario.name}"
  reinstall_app if scenario.source_tag_names.include?('@reinstall_app'))
  ...
end
alannichols
  • 1,496
  • 1
  • 10
  • 20