selenium israel meetup
TRANSCRIPT
![Page 1: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/1.jpg)
Mobile Grid - Getting Started
Selenium Israel Meetup November 25, 2015
![Page 2: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/2.jpg)
The Mobile Grid• Get test results as quickly as possible by parallelizing
your tests.
• Validate different operating systems version, manufacturers, locales & screen sizes simultaneously.
• Capture critical metadata for reporting.
• Flexibility of accessing your devices locally via adb or instruments.
• You don’t expose your app or sensitive data to the cloud.
![Page 3: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/3.jpg)
What I’ll demo…• Getting connected devices programmatically.
• Launching Grid & Appium nodes programmatically.
• Capturing video and logcat data for reporting.
• Running tests distributed.
• Running tests in parallel.
• Leveraging your test runs with cloud test services. e.g. Sauce Labs.
• Reduce your runtime costs by only executing selected scenarios.
• Generating the Allure report.
• Lets briefly look at the code…
![Page 4: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/4.jpg)
Appium Server & Nodes Methods
![Page 5: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/5.jpg)
ADB Methods (Video and Logcat)
![Page 6: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/6.jpg)
Rake Task
![Page 7: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/7.jpg)
Spec Helper
![Page 8: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/8.jpg)
Spec Example
![Page 9: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/9.jpg)
• Run the examples:
• Distributed: rake android[dist]
• https://www.dropbox.com/s/8md7ihp2i6pc5pw/distributed.mov?dl=0
• Parallel: rake android[parallel]
• https://www.dropbox.com/s/o7f6gb7chq51xya/parallel.mov?dl=0
• Distributed: rake android[dist,sauce] * run tests tagged :sauce in Sauce Labs.
• Generate the Allure report.
• allure generate report output/allure/*
• allure report open
• https://www.dropbox.com/s/a8g0erkabpa5zny/signup_failure.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
Demo Time
![Page 10: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/10.jpg)
Wunderlist Mobile Grid
![Page 11: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/11.jpg)
• 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 hubs, router, Mac)
• Blink(1) programmable usb light to display CI status.
• Jenkins - builds and runs smoke tests on every commit.
CI Machine Specs
![Page 12: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/12.jpg)
![Page 13: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/13.jpg)
![Page 14: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/14.jpg)
That is great & all but reporting is key!
![Page 15: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/15.jpg)
Challenges• Adb disconnects.
• I solved this by programmatically rebooting USB hubs before every test run.
• WiFi disconnects.
• I solved this by toggling airplane mode on/off prior to every test run.
• Other Solutions:
• Reverse USB tethering. (requires rooting.)
• WiFi connection apps.
• Using multiple routers on different broadcasting channels.
• Spreading the devices apart.
• Alternatives to real devices:
• Android Studio emulators.
• Cannot video record. * I have a solution for this and will open source it.
• Emulators with VNC clients to record test sessions. (Facebook does this.)
• A big plus IMO is that you have access your apps local 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. :/
• Using multiple Docker containers running emulator nodes. (Similar setup to the selenium web containers)
• Some devices just behave erratically. (random reboots, cannot connect to adb, wonky text output, battery issues)
![Page 16: Selenium Israel Meetup](https://reader030.vdocuments.us/reader030/viewer/2022020410/58a17fd61a28abca5a8b4a6f/html5/thumbnails/16.jpg)
Thank You!
• email: [email protected]
• twitter: @isonic1
• https://github.com/isonic1/selenium-conf-2015