parallel testing with appium
Post on 11-Jan-2017
615 Views
Preview:
TRANSCRIPT
© Sauce Labs, Inc.
Parallel testing with Appium!
Moiz Virani, Software engineer @ Sauce Labs, Inc
.
© Sauce Labs, Inc.
CS @ University of kansas
Software engineer @ Sauce Labs
Core contributor @ Appium
About me
@moizjv moiz@saucelabs.com
© Sauce Labs, Inc.
Overview
• Introduction• Appium architecture overview• Selenium Grid• Appium setup with grid• Demo• Scaling parallel tests• Demo 2• Conclusion
© Sauce Labs, Inc.
AppiumI promise to be awesome!
© Sauce Labs, Inc.
Appium
• Open source• Selenium for mobile• Client/Server architecture• JSON wire protocol • One device at a time with one server (present)• Yes selenium grid for parallel testing• Six language clients
© Sauce Labs, Inc.
Appium: How it works
Test Script
Appium Server
Device Manipulat
ion (adb, etc)
Device Automation
(UI Automator)
Android Device
HTTP
© Sauce Labs, Inc.
Parallel Tests It is so fast!
© Sauce Labs, Inc.
Design principles :
• Atomic: small and concise• Independent• Organized• Configurable• https://github.com/saucelabs-test-frameworks/
© Sauce Labs, Inc.
Selenium Grid :
• Another web server - Hub• Manages other webdrivers• Manages appium servers • Responsible for distributing
tests• Appium server is here - Node
© Sauce Labs, Inc.
Steps for grid setup:
• Download Selenium-standalone.jar
j java -jar selenium-server-standalone-2.48.2.jar -role hubava -jar selenium-server-standalone-2.48.2.jar -role hub
• Start it with role as hub• Start multiple emulators or devices (iOS limitation)
© Sauce Labs, Inc.
Steps for grid setup: Appium
• Currently appium can only handle one session at a time• Start multiple appium sessions with different port • Define configuration file to rester session with hub• Register session with hub using —nodeconfig.json• https://github.com/appium/appium/blob/master/docs/en/adva
nced-concepts/grid.md• example
https://github.com/moizjv/appium/blob/appium_meetup/android1.json
node . --port 4000 --nodeconfig ./android1.json -U emulator-5554 -bp 2252
node . --port 4000 --nodeconfig ./android1.json -U emulator-5554 -bp 2252
© Sauce Labs, Inc.
Running parallel tests
• Configure tests to run in parallel• Point test to hub as remote driver• Set capabilities to match registered remote
driver• Run the tests!!!
© Sauce Labs, Inc.
Demo Live demos are dangerous!
© Sauce Labs, Inc.
Conclusion
• Parallel tests should be written to scale• Presently iOS has limitation one simulator at a time• Parallel testing strategy if done right can speed up
testing process significantly
© Sauce Labs, Inc.
Quiz
• What is the latest version of beta • What is the latest version of appium• What does appium use under the hood for Android ?• What does appium use under the hood for iOS?
© Sauce Labs, Inc.
Questions?
Test more, test oftenand succeed!
Happy Testing :)
© Sauce Labs, Inc.
Thank You.
© Sauce Labs, Inc.
Q and A!
top related