2015-02-10 81 views
0

我打算通過Appium測試應用更新。我的要求是我會爲例如應用程序版本1.1安裝,然後執行一些操作,然後不重置應用程序內容我想要安裝應用程序版本1.2。使用appium測試iOS應用更新

我們可以通過Appium實現這一目標?或者有什麼工具可以用於此更新測試?

我以「NORESET」標誌兩會試過,他們是因爲發行工作的罰款Appium 1.2.0,但不與Appium最新版本1.3.4。

如果我開始「NORESET」設置爲TRUE它沒有安裝應用第二次,因爲它已經安裝了新的會話。有什麼方法可以在開始第二次會話之前覆蓋此設置,以便安裝新版本的應用程序?

謝謝。

+0

我對Android應用測試有類似的問題:是否有可能使用Appium測試應用更新? – Andrius 2015-02-12 07:13:21

+0

我沒有設法通過使用Appium來實現此目的,所以我通過使用adb命令+ mocha,grunt等的組合來實現。 – Andrius 2015-02-19 12:34:14

回答

0

也許一個做到這一點的方法是:

  • 已經安裝在首位
  • 使用Appium一般不應用程序通過命令行來安裝和準備1.1版本的應用程序進行更新
  • 更新(安裝通過命令行您的應用程序的應用程序V.1.2,這裏是一些答案應該爲iOS how to install an ipa/app file into iPhone with command line?工作)
  • 使用Appium與沒有復位標誌剛開始您的應用程序(目前V.1.2),並檢查一切很好。
0

這取決於你所使用的測試。如果你使用的黃瓜,因爲我,你的文件夾結構應該是這個樣子:

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

的env.rb文件看起來像:

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 

的appium.txt文件看起來像

[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 = "" 

所述的Gemfile包括:

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' 

我會看看醬黃瓜的教程,這是一個不可或缺的資源。此外,這是一個紅寶石解決方案,但您可以根據需要翻譯它。