Testing Native iOS Apps with Appium

Download Testing Native iOS Apps with Appium

Post on 09-May-2015

9.512 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

<ul><li>1.Testing Native iOSApps with AppiumDylan Lacey, Sauce Labs Inc.@DylanLacey</li></ul> <p>2. What is Appium?+ 3. Framework for Automating Browsers fortestingUses actual Browsers, ergo functions likea real user (mostly)Can run locally or remotelySelenium 4. Appium is a SeleniumServer for iOSNative app controls are kinda webcontrolsFind things, click them, assert on contentRun your tests under automation 5. Rubyists Testing 6. iOS Testing 7. ...Wat?TESTAPPIUMSelenium Instruments.js 8. Youre Lying. Show usCodedriver = Selenium::Webdriver.for( :remote, {:desired_capabilities =&gt;{:browserName =&gt; iOS,:platform =&gt; Mac,:version =&gt; 6.0,:app =&gt; ABSOLUTE_APP_PATH},:url =&gt; http://127.0.0.1:4723/wd/hub}) 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. 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. 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. Demo 13. Host RemotelyBeing a server, you can host tests onremote machinesConnect them to a GridRun them in parallelPay someone else to bother 14. Gif because I feel leftout 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 </p>