SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
The Mobile Grid - Getting Started
Android & iOS
Kiev, Ukraine - 26 Feb 2016
How will you test all of these?!
The Challenge!
And each one of these cases?
• Validate every locale / languages your app supports.
• Validate every OS version your app supports.
• Validate different resolutions.
• Validate different screen sizes (phones, tablets, phablets etc..).
• Validate different device manufacturers.
You could try the single test
approach!
Not recommend…
Or the multi-threaded approach!
Also, not recommend…
Though, this guy doesn’t seem to mind.
Still not recommend, however…
Hire an army of zombie testers?!
Nah, definitely not recommended!!!
So what options do we have?!
• Test Automation of course!
• But how, why, and where???
Run Tests Single threaded?
Still, not recommend…
Parallelization!
Selenium Grid + Appium
BFFS 4EVER
Test On The Cloud
• The Pros:
• It’s the present and the future of automated testing.
• Ease of setup and integration.
• Save on costs of buying mobile devices or machines.
• Some test services provide you with excellent analytics and reporting.
• Some test services integrate well with cloud CI services. e.g. Travis CI.
• You expose your app to a much larger range of devices and OS’s.
• The Cons:
• It can be difficult sometimes to narrow down issues.
• Network problems.
• Latency issues.
• Outages can occur.
• Bugs in their software.
• Acquired by another company and then shutdown.
• Costs can become significant when running CI on every commit.
Cloud Test Services
• Sauce Labs
• Test Object
• Amazon Test Cloud (was Appthwack)
• Google Test Lab (was Appurify)
• Perfecto Mobile
• Testdroid
• TouchTest
• Keynote (was Device Anywhere)
Just to name a few…
The Mobile Grid
• The Pros:
• You can run tests an unlimited amount without worrying about costs.
• You’re not handcuffed to a cloud test services 24/7 availability.
• You have all the critical test data local for debugging.
• Have full access to every connected device via adb or instruments.
• No latency issues.
• You don't expose your app or sensitive data to the cloud.
• The Cons:
• Can be tough finding documentation or good examples specific to your bindings.
• Takes a bit of time to setup and smooth things out.
• Require some degree of ops knowledge.
• You might not be able to expose your app to a large range of devices and os’s.
• Build and maintain the entire setup (software & hardware).
• Devices can be a real pain! (I’ll cover this later.)
What I’ll demo…
• Getting all of the connected devices programmatically.
• Launching Grid hub & Appium nodes programmatically.
• Capturing screenshots, logs, video and logcat for reporting.
• Running single threaded.
• Running tests distributed.
• Running tests in parallel.
• Leveraging cloud test services such as Sauce Labs.
• Reduce your runtime costs by only executing selected scenarios.
• Generating an Allure report with all above metadata attached.
• The grid setup at Wunderlist.
• and lets briefly look at the core code…
Get Connected Device Data
• We retrieve connected device data and insert into an environment variable.
• The “thread” value will then match our “TEST_NUMBER” env var for
parallelization. TEST_NUMBER is created from the parallel gem.
• Capture device data for
every connected device.
• At a minimum, you need the
UDID to connect appium to
a grid node.
• However, it is important to
know the OS, and SDK
versions too.
Node Config Method
• Programmatically create your node based on the connected devices.
Generated Node Config
Appium Server Setup
• Method to setup appium server and pass in any arguments.
• The wonderful Appium developers baked a grid node into the
appium server.
Launch Hub & Appium Server Methods
• We set a “THREAD” variable. This will tell our parallel library how
many processes it should run.
• Launch the nodes in parallel so all start at the same time.
ADB Methods (Video and Logcat)
• Video records up to 180 seconds for real devices.
• Capture logcat data.
Spec Helper Methods
• Parse the DEVICES env variable and match it’s thread to
the running process, then initialize appium.
Test Setup and Teardown
• Set the UDID environment
variable for your tests.
• Before each test, start video
and logcat.
• After each test, stop video
and logcat.
• Only attach output to report
on failures!
Test Example
• Here is where the UDID environment variable is used. This
will let us know which device ran a specific test.
Android Setup
• Download every SDK version your app supports.
• Install Intel HAXM Accelerator!
Create Android Emulators
• Create an emulator for each sdk you installed.
Single Thread Test Example
• As you can see, this example was pretty slow. 48 seconds
in total.
• Distributed means we spread each
test to an available node. e.g.
device.
• This example only has two tests
(specs). So in theory we only need
two devices, with each running a
test.
• In this example we have one
emulator (left) and one real device
(right).
• Our runtime goes from 48 seconds
single-threaded to 27 seconds
multi-threaded.
Distributed Test
Example
Allure Report Distributed
Parallel Test Example
• Parallel in this case means we
run same tests on every
available node. e.g. device.
• This example has two tests
(specs). All tests will run on all
devices/emulators.
• We have five emulators, each
running a different SDK version,
and one real device (bottom
right).
• By testing on all SDK versions,
this gives us a warm fuzzy
feeling our app works correctly
on all versions.
• As you saw, emulator-5554
(GRID5) crashed. Lets look at
the report!
Allure Report Parallel
Run On The Cloud
• In the example tests theres only one spec tagged with “sauce”.
If you we had more, we could run in parallel for faster test
execution in Sauce Labs. e.g rake android[dist,sauce].
Allure Report Sauce Labs
• If needed, you can also download the test assets and attach
to the allure. Example: https://github.com/isonic1/appium-
mobile-grid/blob/master/common/dowload_sauce_assets.rb
iOS Setup
• Enable Developer Mode on your devices.
• Pair your devices to your machine.
• Enable UI Automation in the Developer menu.
• Ideally, connect a device running each os version your app
supports. iOS is generally pretty good at backwards
compatibility of os versions.
Real devices…
Parallel iOS
iOS Report
Wunderlist Mobile Grid
• Mac Pro - 3.5 GHz 6-Core - 32 GB Ram.
• OSX Server with performance mode enabled.
• Two Anker 9 Port USB Hubs.
• Energenie programmable power strip. (Reboots USB
hubs, router, Mac)
• Blink(1) programmable usb light to display CI status.
• Jenkins - builds and runs smoke tests on every commit.
CI Machine Specs
That is great but reporting is key!
Challenges
• Adb disconnects.
• I programmatically rebooting USB hubs before every test run. This reconnects adb.
• WiFi issues.
• I toggle airplane mode on/off prior to every test run.
• Other Possible Solutions:
• Reverse USB tethering. (requires rooting.)
• Using multiple routers on different broadcasting channels.
• Alternatives to real devices:
• Android Studio emulators.
• Cannot video record. *I will open a source a solution to this.
• A big plus IMO is that you have access your apps files (database) without rooting.
• Can use up a significant amount of memory depending on specs and the number running.
• Using Genymotion emulators. It’s the closest vm software to a real device.
• Has video recording but no API or CLI to start the recording. :/
• Some devices just behave erratically. (random reboots, adb connection issues, wonky text output,
battery issues).
Things to be excited about!
• A replacement for Apple's xcodebuild that makes it easier to build and test iOS or OSX apps.
• https://github.com/facebook/xctool
• WebDriverAgent is a WebDriver server for iOS that runs inside the Simulator and is written
entirely in Objective-C. Can run multiple iOS simulators in parallel.
• https://github.com/facebook/webdriveragent
• Run iOS tests on multiple simulators in parallel at the same time.
• https://github.com/plu/parallel_ios_tests
• Appium iOS driver, backed by Apple XCUITest.
• https://github.com/appium/appium-xcuitest-driver
• Remote control all your Smartphone devices From the comfort of your browser.
• http://openstf.io/
Lastly, some thank you’s
• Thank you to the Selenium open source developers and the
community whom make WebDriver happen.
• Also Dan Cuellar, the creator of Appium, whom is here at the
conference with us.
• If you see Dan, please give him a big bearhug! He’ll love it!
• Without Dan, people like him, and all the open source developers
we would never have these amazing tools to help do our jobs
more efficiently, and for free.
Thank You!
• email: justin.ison@gmail.com
• twitter: @isonic1
• https://github.com/isonic1/appium-mobile-grid
• Android Distributed
• https://www.dropbox.com/s/eidrtd71dbmv7uh/android-distributed.mov?dl=0
• https://www.dropbox.com/s/gildgq9oossdp4k/android-dist-report.mov?dl=0
• Android Parallel
• https://www.dropbox.com/s/fjla64pggg3cbr6/android-parallel.mov?dl=0
• https://www.dropbox.com/s/14ow5q2joikne1s/android-parallel-report.mov?dl=0
• Android Sauce Labs
• https://www.dropbox.com/s/n8gx9lsoxrn77te/android-saucelabs.mov?dl=0
• https://www.dropbox.com/s/4umdim23cvheevj/android-saucelabs-report.mov?dl=0
• iOS Parallel
• https://www.dropbox.com/s/161azld3lq0lc2f/ios_parallel.mov?dl=0
• https://www.dropbox.com/s/pxlzxx2ljl6q1wd/ios_allure_report.mov?dl=0
• Wunderlist Mobile Grid
• https://www.dropbox.com/s/y5xsmnxfldguzr0/grid-trimmed.mov?dl=0
• https://www.dropbox.com/s/675nonhixzq0ct7/emulators.mov?dl=0
• https://www.dropbox.com/s/a8g0erkabpa5zny/signup_failure.mov?dl=0
Slide Videos

Más contenido relacionado

La actualidad más candente

Best Practices in Mobile CI (webinar)
Best Practices in Mobile CI (webinar)Best Practices in Mobile CI (webinar)
Best Practices in Mobile CI (webinar)Sauce Labs
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Sargis Sargsyan
 
Awesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave HaeffnerAwesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave HaeffnerSauce Labs
 
SeConf_Nov2016_London
SeConf_Nov2016_LondonSeConf_Nov2016_London
SeConf_Nov2016_LondonPooja Shah
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best PracticesSauce Labs
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Dan Cuellar
 
Scaling your Automated Tests: Docker and Kubernetes
Scaling your Automated Tests: Docker and KubernetesScaling your Automated Tests: Docker and Kubernetes
Scaling your Automated Tests: Docker and KubernetesManoj Kumar Kumar
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android ApplicationsLeif Janzik
 
Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsSauce Labs
 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StorySauce Labs
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Sauce Labs
 
SeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii SoldatenkoSeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii SoldatenkoAndrii Soldatenko
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the CloudSauce Labs
 
Selenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSelenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSauce Labs
 
Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Bitbar
 
Sauce Labs+Applitools - Automated Visual Testing in the Cloud
Sauce Labs+Applitools - Automated Visual Testing in the CloudSauce Labs+Applitools - Automated Visual Testing in the Cloud
Sauce Labs+Applitools - Automated Visual Testing in the CloudSauce Labs
 
Si fa presto a dire serverless
Si fa presto a dire serverlessSi fa presto a dire serverless
Si fa presto a dire serverlessAlessio Coser
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypressPankajSingh184960
 
Live Panel: Appium Core Committers Answer Your Questions
Live Panel: Appium Core Committers Answer Your Questions		Live Panel: Appium Core Committers Answer Your Questions
Live Panel: Appium Core Committers Answer Your Questions Sauce Labs
 

La actualidad más candente (20)

Best Practices in Mobile CI (webinar)
Best Practices in Mobile CI (webinar)Best Practices in Mobile CI (webinar)
Best Practices in Mobile CI (webinar)
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Awesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave HaeffnerAwesome Test Automation Made Simple w/ Dave Haeffner
Awesome Test Automation Made Simple w/ Dave Haeffner
 
SeConf_Nov2016_London
SeConf_Nov2016_LondonSeConf_Nov2016_London
SeConf_Nov2016_London
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best Practices
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
 
Scaling your Automated Tests: Docker and Kubernetes
Scaling your Automated Tests: Docker and KubernetesScaling your Automated Tests: Docker and Kubernetes
Scaling your Automated Tests: Docker and Kubernetes
 
Sauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFSSauce Labs for Visual Studio Team Services & TFS
Sauce Labs for Visual Studio Team Services & TFS
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android Applications
 
Beyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms OrganizationsBeyond the Release: CI That Transforms Organizations
Beyond the Release: CI That Transforms Organizations
 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life Story
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
SeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii SoldatenkoSeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii Soldatenko
 
Continuous Testing in the Cloud
Continuous Testing in the CloudContinuous Testing in the Cloud
Continuous Testing in the Cloud
 
Selenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSelenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce Labs
 
Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10Mobile performance metrics and performance monitoring meetup 2017 05 10
Mobile performance metrics and performance monitoring meetup 2017 05 10
 
Sauce Labs+Applitools - Automated Visual Testing in the Cloud
Sauce Labs+Applitools - Automated Visual Testing in the CloudSauce Labs+Applitools - Automated Visual Testing in the Cloud
Sauce Labs+Applitools - Automated Visual Testing in the Cloud
 
Si fa presto a dire serverless
Si fa presto a dire serverlessSi fa presto a dire serverless
Si fa presto a dire serverless
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
 
Live Panel: Appium Core Committers Answer Your Questions
Live Panel: Appium Core Committers Answer Your Questions		Live Panel: Appium Core Committers Answer Your Questions
Live Panel: Appium Core Committers Answer Your Questions
 

Destacado

Effective Testing in Agile
Effective Testing in AgileEffective Testing in Agile
Effective Testing in AgileAndrii Dzynia
 
Parallel testing with appium
Parallel testing with appiumParallel testing with appium
Parallel testing with appiummoizjv
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingBitbar
 
Make the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourceMake the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourcePerfecto by Perforce
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarBitbar
 
Selenium Grid
Selenium GridSelenium Grid
Selenium Gridnirvdrum
 
Getting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumGetting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumSauce Labs
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 

Destacado (8)

Effective Testing in Agile
Effective Testing in AgileEffective Testing in Agile
Effective Testing in Agile
 
Parallel testing with appium
Parallel testing with appiumParallel testing with appium
Parallel testing with appium
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App TestingHow to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
 
Make the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open SourceMake the Shift from Manual to Automation with Open Source
Make the Shift from Manual to Automation with Open Source
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
Selenium Grid
Selenium GridSelenium Grid
Selenium Grid
 
Getting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumGetting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & Appium
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 

Similar a Selenium Camp 2016 - Kiev, Ukraine

Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
Run somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarmRun somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarmNaoki AINOYA
 
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsImproving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsIsaac Murchie
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Sauce Labs
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"DataArt
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Ryan Cuprak
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Applitools
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping QualityMichael Roufa
 
Code Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsDana Luther
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with AppiumManoj Kumar Kumar
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automationVishal Banthia
 
Mobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleMobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleSathish Gogineni
 
Automation testing on ios platform using appium
Automation testing on ios platform using appiumAutomation testing on ios platform using appium
Automation testing on ios platform using appiumAmbreen Khan
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conferenceIsaac Murchie
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)Bitbar
 

Similar a Selenium Camp 2016 - Kiev, Ukraine (20)

Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
Run somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarmRun somke test on AWS DeviceFarm
Run somke test on AWS DeviceFarm
 
Improving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce LabsImproving Android app testing with Appium and Sauce Labs
Improving Android app testing with Appium and Sauce Labs
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"
 
Introducing AWS Device Farm
Introducing AWS Device FarmIntroducing AWS Device Farm
Introducing AWS Device Farm
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
 
Bootstrapping Quality
Bootstrapping QualityBootstrapping Quality
Bootstrapping Quality
 
Run & Report
Run & ReportRun & Report
Run & Report
 
Code Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application Migrations
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Cloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak KoyuncuCloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak Koyuncu
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
Mobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleMobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large Scale
 
Automation testing on ios platform using appium
Automation testing on ios platform using appiumAutomation testing on ios platform using appium
Automation testing on ios platform using appium
 
Appium mobile web+dev conference
Appium   mobile web+dev conferenceAppium   mobile web+dev conference
Appium mobile web+dev conference
 
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
LDNSE: Testdroid for Mobile App and Web Testing (London Selenium Meetup)
 

Último

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 

Último (20)

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 

Selenium Camp 2016 - Kiev, Ukraine

  • 1. The Mobile Grid - Getting Started Android & iOS Kiev, Ukraine - 26 Feb 2016
  • 2. How will you test all of these?! The Challenge!
  • 3. And each one of these cases? • Validate every locale / languages your app supports. • Validate every OS version your app supports. • Validate different resolutions. • Validate different screen sizes (phones, tablets, phablets etc..). • Validate different device manufacturers.
  • 4. You could try the single test approach! Not recommend…
  • 5. Or the multi-threaded approach! Also, not recommend…
  • 6. Though, this guy doesn’t seem to mind. Still not recommend, however…
  • 7. Hire an army of zombie testers?! Nah, definitely not recommended!!!
  • 8. So what options do we have?! • Test Automation of course! • But how, why, and where???
  • 9. Run Tests Single threaded? Still, not recommend…
  • 11. Selenium Grid + Appium BFFS 4EVER
  • 12. Test On The Cloud • The Pros: • It’s the present and the future of automated testing. • Ease of setup and integration. • Save on costs of buying mobile devices or machines. • Some test services provide you with excellent analytics and reporting. • Some test services integrate well with cloud CI services. e.g. Travis CI. • You expose your app to a much larger range of devices and OS’s. • The Cons: • It can be difficult sometimes to narrow down issues. • Network problems. • Latency issues. • Outages can occur. • Bugs in their software. • Acquired by another company and then shutdown. • Costs can become significant when running CI on every commit.
  • 13. Cloud Test Services • Sauce Labs • Test Object • Amazon Test Cloud (was Appthwack) • Google Test Lab (was Appurify) • Perfecto Mobile • Testdroid • TouchTest • Keynote (was Device Anywhere) Just to name a few…
  • 14. The Mobile Grid • The Pros: • You can run tests an unlimited amount without worrying about costs. • You’re not handcuffed to a cloud test services 24/7 availability. • You have all the critical test data local for debugging. • Have full access to every connected device via adb or instruments. • No latency issues. • You don't expose your app or sensitive data to the cloud. • The Cons: • Can be tough finding documentation or good examples specific to your bindings. • Takes a bit of time to setup and smooth things out. • Require some degree of ops knowledge. • You might not be able to expose your app to a large range of devices and os’s. • Build and maintain the entire setup (software & hardware). • Devices can be a real pain! (I’ll cover this later.)
  • 15. What I’ll demo… • Getting all of the connected devices programmatically. • Launching Grid hub & Appium nodes programmatically. • Capturing screenshots, logs, video and logcat for reporting. • Running single threaded. • Running tests distributed. • Running tests in parallel. • Leveraging cloud test services such as Sauce Labs. • Reduce your runtime costs by only executing selected scenarios. • Generating an Allure report with all above metadata attached. • The grid setup at Wunderlist. • and lets briefly look at the core code…
  • 16. Get Connected Device Data • We retrieve connected device data and insert into an environment variable. • The “thread” value will then match our “TEST_NUMBER” env var for parallelization. TEST_NUMBER is created from the parallel gem.
  • 17. • Capture device data for every connected device. • At a minimum, you need the UDID to connect appium to a grid node. • However, it is important to know the OS, and SDK versions too.
  • 18. Node Config Method • Programmatically create your node based on the connected devices.
  • 20. Appium Server Setup • Method to setup appium server and pass in any arguments. • The wonderful Appium developers baked a grid node into the appium server.
  • 21. Launch Hub & Appium Server Methods • We set a “THREAD” variable. This will tell our parallel library how many processes it should run. • Launch the nodes in parallel so all start at the same time.
  • 22. ADB Methods (Video and Logcat) • Video records up to 180 seconds for real devices. • Capture logcat data.
  • 23. Spec Helper Methods • Parse the DEVICES env variable and match it’s thread to the running process, then initialize appium.
  • 24. Test Setup and Teardown • Set the UDID environment variable for your tests. • Before each test, start video and logcat. • After each test, stop video and logcat. • Only attach output to report on failures!
  • 25. Test Example • Here is where the UDID environment variable is used. This will let us know which device ran a specific test.
  • 26.
  • 27. Android Setup • Download every SDK version your app supports. • Install Intel HAXM Accelerator!
  • 28. Create Android Emulators • Create an emulator for each sdk you installed.
  • 29. Single Thread Test Example • As you can see, this example was pretty slow. 48 seconds in total.
  • 30.
  • 31. • Distributed means we spread each test to an available node. e.g. device. • This example only has two tests (specs). So in theory we only need two devices, with each running a test. • In this example we have one emulator (left) and one real device (right). • Our runtime goes from 48 seconds single-threaded to 27 seconds multi-threaded. Distributed Test Example
  • 33. Parallel Test Example • Parallel in this case means we run same tests on every available node. e.g. device. • This example has two tests (specs). All tests will run on all devices/emulators. • We have five emulators, each running a different SDK version, and one real device (bottom right). • By testing on all SDK versions, this gives us a warm fuzzy feeling our app works correctly on all versions. • As you saw, emulator-5554 (GRID5) crashed. Lets look at the report!
  • 35. Run On The Cloud • In the example tests theres only one spec tagged with “sauce”. If you we had more, we could run in parallel for faster test execution in Sauce Labs. e.g rake android[dist,sauce].
  • 36. Allure Report Sauce Labs • If needed, you can also download the test assets and attach to the allure. Example: https://github.com/isonic1/appium- mobile-grid/blob/master/common/dowload_sauce_assets.rb
  • 37.
  • 38. iOS Setup • Enable Developer Mode on your devices. • Pair your devices to your machine. • Enable UI Automation in the Developer menu. • Ideally, connect a device running each os version your app supports. iOS is generally pretty good at backwards compatibility of os versions. Real devices…
  • 42. • Mac Pro - 3.5 GHz 6-Core - 32 GB Ram. • OSX Server with performance mode enabled. • Two Anker 9 Port USB Hubs. • Energenie programmable power strip. (Reboots USB hubs, router, Mac) • Blink(1) programmable usb light to display CI status. • Jenkins - builds and runs smoke tests on every commit. CI Machine Specs
  • 43.
  • 44.
  • 45. That is great but reporting is key!
  • 46. Challenges • Adb disconnects. • I programmatically rebooting USB hubs before every test run. This reconnects adb. • WiFi issues. • I toggle airplane mode on/off prior to every test run. • Other Possible Solutions: • Reverse USB tethering. (requires rooting.) • Using multiple routers on different broadcasting channels. • Alternatives to real devices: • Android Studio emulators. • Cannot video record. *I will open a source a solution to this. • A big plus IMO is that you have access your apps files (database) without rooting. • Can use up a significant amount of memory depending on specs and the number running. • Using Genymotion emulators. It’s the closest vm software to a real device. • Has video recording but no API or CLI to start the recording. :/ • Some devices just behave erratically. (random reboots, adb connection issues, wonky text output, battery issues).
  • 47. Things to be excited about! • A replacement for Apple's xcodebuild that makes it easier to build and test iOS or OSX apps. • https://github.com/facebook/xctool • WebDriverAgent is a WebDriver server for iOS that runs inside the Simulator and is written entirely in Objective-C. Can run multiple iOS simulators in parallel. • https://github.com/facebook/webdriveragent • Run iOS tests on multiple simulators in parallel at the same time. • https://github.com/plu/parallel_ios_tests • Appium iOS driver, backed by Apple XCUITest. • https://github.com/appium/appium-xcuitest-driver • Remote control all your Smartphone devices From the comfort of your browser. • http://openstf.io/
  • 48.
  • 49. Lastly, some thank you’s • Thank you to the Selenium open source developers and the community whom make WebDriver happen. • Also Dan Cuellar, the creator of Appium, whom is here at the conference with us. • If you see Dan, please give him a big bearhug! He’ll love it! • Without Dan, people like him, and all the open source developers we would never have these amazing tools to help do our jobs more efficiently, and for free.
  • 50. Thank You! • email: justin.ison@gmail.com • twitter: @isonic1 • https://github.com/isonic1/appium-mobile-grid
  • 51. • Android Distributed • https://www.dropbox.com/s/eidrtd71dbmv7uh/android-distributed.mov?dl=0 • https://www.dropbox.com/s/gildgq9oossdp4k/android-dist-report.mov?dl=0 • Android Parallel • https://www.dropbox.com/s/fjla64pggg3cbr6/android-parallel.mov?dl=0 • https://www.dropbox.com/s/14ow5q2joikne1s/android-parallel-report.mov?dl=0 • Android Sauce Labs • https://www.dropbox.com/s/n8gx9lsoxrn77te/android-saucelabs.mov?dl=0 • https://www.dropbox.com/s/4umdim23cvheevj/android-saucelabs-report.mov?dl=0 • iOS Parallel • https://www.dropbox.com/s/161azld3lq0lc2f/ios_parallel.mov?dl=0 • https://www.dropbox.com/s/pxlzxx2ljl6q1wd/ios_allure_report.mov?dl=0 • Wunderlist Mobile Grid • https://www.dropbox.com/s/y5xsmnxfldguzr0/grid-trimmed.mov?dl=0 • https://www.dropbox.com/s/675nonhixzq0ct7/emulators.mov?dl=0 • https://www.dropbox.com/s/a8g0erkabpa5zny/signup_failure.mov?dl=0 Slide Videos