Testing Native iOS Apps with Appium

11,753 views

Published on

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
11,753
On SlideShare
0
From Embeds
0
Number of Embeds
2,192
Actions
Shares
0
Downloads
161
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Testing Native iOS Apps with Appium

  1. 1. Testing Native iOSApps with AppiumDylan Lacey, Sauce Labs Inc.@DylanLacey
  2. 2. What is Appium?+
  3. 3. Framework for Automating Browsers fortestingUses actual Browsers, ergo functions likea real user (mostly)Can run locally or remotely•••Selenium
  4. 4. Appium is a SeleniumServer for iOSNative app controls are kinda webcontrolsFind things, click them, assert on contentRun your tests under automation•••
  5. 5. Rubyists Testing
  6. 6. iOS Testing
  7. 7. ...Wat?TESTAPPIUMSelenium Instruments.js
  8. 8. You’re Lying. Show usCodedriver = Selenium::Webdriver.for( :remote, {:desired_capabilities =>{:browserName => ‘iOS’,:platform => ‘Mac’,:version => ‘6.0’,:app => ABSOLUTE_APP_PATH},:url => “http://127.0.0.1:4723/wd/hub”})
  9. 9. Example - Find, Valuesrequire selenium-webdriverinclude Selenium::WebDriver::DriverExtensions::HasInputDevicesinclude Selenium::WebDriver::DriverExtensions::HasTouchScreenrows = driver.find_elements(:tag_name, "tableCell")rows[0].attribute(:name).should eq "Buttons, Various uses ofUIButton"third_row = driver.find_elements(:tag_name, "tableCell")[2]third_row.location.y.should be 152
  10. 10. Example - Interaction@driver.find_elements(:tag_name, "tableCell")[9].click@switch = @driver.find_element(:tag_name, "switch")@switch.displayed?.should be_true@switch.attribute("value").should be 0@switch.click@switch.attribute("value").should be 1@text_field = @driver.find_element(:tag_name, "textField")@text_field.send_keys("discombobulate")@text_field.attribute("value").should eq "discombobulate"
  11. 11. Example - Scrollingrow = @driver.find_elements(:tag_name, "tableCell")[2]initial_location = row.locationaction = @driver.touch.flick(0, 20)action.performinitial_location.should_not eq row.location
  12. 12. Demo
  13. 13. Host RemotelyBeing a server, you can host tests onremote machinesConnect them to a GridRun them in parallelPay someone else to bother••••
  14. 14. Gif because I feel leftout
  15. 15. Thanks for Listening;Have free sh... stuffAppium Site: Appium.ioFree Sauce Labs minutes: RailsConf13PSST: Totally free for FOSS projectsHit me up with Questions: @dylanlaceyor dylan@saucelabs.com••••

×