0

I am planning to test app update through Appium. My requirement is I will have for e.g. app version 1.1 installed and then perform some operation and then without resetting app content I would like have app version 1.2 installed.

Can we achieve this through Appium? Or is there any tool we can use for this update testing?

I tried with starting two sessions with 'noReset' flag, they are working fine because of issue with Appium 1.2.0 but not with Appium latest version 1.3.4.

If I start new session with 'noReset' set to True it's not installing app second time as it is already installed. Is there any way I can override this setting before starting second session so that it will install new version of the app?

Thanks.

  • I have similar question for Android app testing: Is it possible to test app update using Appium? – Andrius Feb 12 '15 at 07:13
  • I didn't managed to achieve this by using Appium, so I did it by using combination of adb commands + mocha, grunt, etc. – Andrius Feb 19 '15 at 12:34

2 Answers2

0

Maybe one way to do this is to:

  • Have no application installed in the first place
  • Use Appium normally to install and prepare your version 1.1 app for update
  • Update via command line (install app v.1.2 of your app via command line, here is some answer that should work for iOS how to install an ipa/app file into iPhone with command line?)
  • Use Appium with the no-reset flag to just start your app (now v.1.2) and check that everything is fine.
Community
  • 1
  • 1
Ru Cindrea
  • 703
  • 2
  • 5
  • 16
0

This depends on what you're using for testing. If you're using cucumber as I am, your folder structure should look something like:

|features
    |>step_definitions
    |>support
        |>env.rb
    |appium.txt

The env.rb file looks like:

class AppiumWorld; end

appium_txt = File.join(Dir.pwd, 'appium.txt')
caps = Appium.load_appium_txt file: appium_txt
Appium::Driver.new(caps)
Appium.promote_appium_methods [AppiumWorld]
Appium.promote_singleton_appium_methods [Base]

World do
  AppiumWorld.new
end

Before do |scenario|
  $driver.start_driver
end

After do |scenario|
  $driver.driver_quit
end

The appium.txt file looks like

[caps]
appiumVersion = "1.3.4"
deviceName = "iPhone Simulator"
device-orientation = "portrait"
platformVersion = "8.1"
platformName = "iOS"
browserName = ""
app = "Absolute path to your app which you can point at any version"
name = "Test again"


[appium_lib]
sauce_username = ""
sauce_access_key = ""

The gemfile includes:

gem 'sauce-cucumber', require: false
gem 'selenium-webdriver'
gem 'cucumber', '~> 1.3.19'
gem 'appium_console', '~> 1.0.3'
gem 'appium_lib', '~> 6.0.0'

I would look at the tutorials for sauce-cucumber, that was an integral resource. Also, this is a ruby solution, but you can probably translate it as needed.

Joe Susnick
  • 6,544
  • 5
  • 44
  • 50