Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
-
Upload
bitbar -
Category
Technology
-
view
2.238 -
download
2
Transcript of Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
![Page 1: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/1.jpg)
12 May 2015
Ville-Veikko HelppiTechnical Product Manager
Parallel Test Runs with Appium on Real Mobile Devices
W E B I N A R
![Page 2: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/2.jpg)
Agenda
• Testdroid Update
• Statistics from Q1'2015
• Testing and Mobile Test Automation
• Appium – Client vs. Server Side
Execution
• Demonstration
• Q&A
![Page 3: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/3.jpg)
TESTDROID UPDATE
![Page 4: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/4.jpg)
Public Device Cloud on-demand devices
(multitenant)
Mobile app testing on thousands of real
Android and iOS devices hosted by
Bitbar
Private Device Cloud Reserved Devices
Hosted by Bitbar in the US and/or Europe
Devices chosen by and reserved only for
the Customer
On-Premise Device Cloud
Automated mobile app testing devices
hosted by the customer, usually 30-500 devices
1 Product – 3 Deployment Options
Testdroid Cloud Testdroid Enterprise Testdroid PrivateCloud
![Page 5: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/5.jpg)
New Pricing Plans for Cloud
*) = Prices for annual commitment
![Page 6: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/6.jpg)
Appium
• Client-Side Execution
• Server-Side Execution
![Page 7: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/7.jpg)
Q1'2015 STATISTICS
![Page 8: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/8.jpg)
Q1'2015 – Test Run Stats
![Page 9: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/9.jpg)
Why Apps Fail?
![Page 10: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/10.jpg)
iOS 8.0
iOS 8.0.2
iOS 8.1
iOS 8.1.1
iOS 8.2
iOS 8 ALL
KitKat 4.4
KitKat 4.4.2
KitKat 4.4.3
KitKat 4.4.4
KitKat ALL
Lollipop 5.0
Lollipop 5.0.1
Lollipop 5.0.2
Lollipop ALL
0 5 10 15 20 25 30 35
Failed test runs. Percentage (%).
![Page 11: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/11.jpg)
Some Observations
1
2
![Page 12: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/12.jpg)
Some Observations3
4
![Page 13: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/13.jpg)
Some Observations
5
6
![Page 14: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/14.jpg)
Android Fragmentation 2014
by Open Signal report July 2014
![Page 15: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/15.jpg)
How Many Devices is Enough?
~90%market coverage can
be achieved with
128devices
~20%market coverage can
be achieved with
12 devices
US Market
25 Android devices= ~2/3 market
Global Market
60 Android devices= ~1/2 market
![Page 16: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/16.jpg)
TESTING AND MOBILE TEST AUTOMATION
![Page 17: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/17.jpg)
OS
versions
Chipsets
CPU +
GPU
Tens of
OEMs
Memory
Displays
(resolutions,
physical hw)
OEM
mods
Other
hardware
(connectivity
calibration)
Relation
to other
software
Where Test Automation Can Help
![Page 18: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/18.jpg)
Correct behaviouracross platforms and browsers
Integration with web back-ends
Typically need to fully utilize HW (CPU+GPU)
Resource (e.g. battery) consumption
OpenGL ES 2/3
Functionality and usability
Screen orientations, connectivity, user profiles
Robustness
Robustness and security!
Brand
Compliances, verification with back-
ends and data
Different Mobile 'App Verticals'
![Page 19: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/19.jpg)
Manual Testing is not Agile
![Page 20: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/20.jpg)
Test Automation is Agile
![Page 21: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/21.jpg)
Why Real Devices Are Must-to-Have
• Emulators cannot help you to test...
• User Experience
• Usability
• Hardware
• Software
• Infrastructure
0 % = the percentage of your app users that use emulator to run your app!
![Page 22: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/22.jpg)
Manual vs. Automation
Manual Automation
![Page 23: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/23.jpg)
Manual vs. Automation
Smaller coverage, More money burnt & time wasted, Error-prone
Manual Automation
Large coverage,
quickly completed,
Less money & time wasted, Exact results.
![Page 24: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/24.jpg)
APPIUM
– CLIENT VS. SERVER SIDE EXECUTION
![Page 25: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/25.jpg)
Family Tree of Android Test
Automation Frameworks
JUnit
Android Instrumentation Framework
Robotium
Espresso and Espresso v2
uiautomator
AppiumExtSolo
Calabash
![Page 26: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/26.jpg)
What Framework Works You The Best?
Robotium uiautomator Espresso Appium Calabash
Android Yes Yes Yes Yes Yes
iOS No No No Yes Yes
Mobile web Yes
(Android)
Limited to x.y
clicks
No Yes (Android &
iOS)
Yes
(Android)
Scripting
Language
Java Java Java Almost any Ruby
Test creation
tools
Testdroid
Recorder
UI Automator
viewer
Hierarchy
Viewer
Appium.app CLI
Supported
API levels
All 16 => 8, 10, 15- All All
Community Contributors Google Google Active Pretty quiet
![Page 27: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/27.jpg)
Selenium & Appium
![Page 28: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/28.jpg)
Client Side Appium at
Testdroid CloudTest Script
Test Case
Desired Capabilities
{
“device”: “Android”,
“app”: “/Users/user/ApiDemos.apk”
“app-package”: “com.example.android.apis”
“app-activity”: “.ApiDemos”
}
![Page 29: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/29.jpg)
Test Script
Test Case
Desired Capabilities
WebDriverhttp://localhost:4723/wd/hub
Appium Server
4723
Device
Localhost
(DesiredCaps)
![Page 30: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/30.jpg)
http://localhost:4723/wd/hub
*Testdroid Caps
http://appium.testdroid.com/wd/hub
(DesiredCaps)
Test Script
Test Case
Desired Capabilities
WebDriver
From Localhost to Testdroid
![Page 31: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/31.jpg)
Client Side Execution
Go tocloud.testdroid.com
![Page 32: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/32.jpg)
Client Side Execution
Get a Device Name
Go tocloud.testdroid.com
![Page 33: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/33.jpg)
Client Side Execution
Add Testdroid Desired Caps to test script
{
“testdroid_username”: “[email protected]”,
“testdroid_password”: “p4s$w0rd”,
“testdroid_project”: “My First Project”,
“testdroid_testrun”: “Test 1”,
“testdroid_device”: “iPad Mini 7.0.4 A1432”,
“testdroid_app”: “http://domain.com/app_v1.ipa”
.
.
“app”: “com.bitbar.testdroid.BitbarIOSSample”
}
Get a Device Name
Go tocloud.testdroid.com
![Page 34: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/34.jpg)
Client Side Execution
driver = webdriver.Remote("http://appium.testdroid.com/wd/hub", desired_caps);
Point the Webdriver to http://appium.testdroid.com/wd/hub
Add Testdroid Desired Caps to test script
Get a Device Name
Go tocloud.testdroid.com
![Page 35: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/35.jpg)
Client Side Execution
Run the Test ScriptGet Results from Testdroid Cloud
Point the Webdriver to http://appium.testdroid.com/wd/hub
Add Testdroid Desired Caps to test script
Get a Device Name
Go tocloud.testdroid.com
![Page 36: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/36.jpg)
Client Side Execution
Pull the Results from the Result URL
driver = webdriver.Remote("http://appium.testdroid.com/wd/hub", desired_caps);
Run the Test ScriptGet Results from Testdroid Cloud
Point the Webdriver to http://appium.testdroid.com/wd/hub
Add Testdroid Desired Caps to test script
Get a Device Name
Go tocloud.testdroid.com
![Page 37: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/37.jpg)
Multiple Devices – Client Side
python testscript.py –device <devicename>1
python testscript.py –device <devicename>2
python testscript.py –device <devicename>n
Test Script
Test Cases
Instigator Script
deviceArray=[
“iPad 4 6.0.1 A1458”,“iPad mini 7.0.4 A1432”,...“iPhone 4S 6.1.3 A1387”,
]
![Page 38: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/38.jpg)
21
3
4
5
6
7
WebDriver Session Request@http://appium.testdroid.com/wd/hub
WebDriver Session Response
Testrun
Configure Project
Appium Ready
Wait for Device toBecome Available
Device 1 Device 2 Device 3
Session
Map
Proxy
Device Cluster
Start Appium
Desired Capabilities, .apk / .ipa
SessionID
SessionID
Sessionid
Test
Script
Appium
Broker
Client Side – Behind the Scenes
![Page 39: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/39.jpg)
Introducing "Server Side Appium"
![Page 40: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/40.jpg)
![Page 41: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/41.jpg)
DemonstrationAppium with Real Devices using Image
Recognition for Hill Climb Racing
![Page 42: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/42.jpg)
Setup
• Using real Android devices at Testdroid Cloud
• Parallel test runs without a need to configure desired
capabilities
• Device groups (= set of devices used for runs) can be
manually created and configured
![Page 43: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/43.jpg)
File Structure• pom.xml (maven)
• testdroid.properties (overwritten after submitted to Cloud)
• run-test.sh (shell script for execution)
• image files
![Page 44: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/44.jpg)
![Page 45: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/45.jpg)
![Page 46: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/46.jpg)
![Page 47: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/47.jpg)
![Page 48: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/48.jpg)
15 seconds
![Page 49: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/49.jpg)
![Page 50: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/50.jpg)
Image Recognition
• Resolution agnostic implementation
• Identifies stretched and rotated images as well
![Page 51: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/51.jpg)
Let's See How it Works!
![Page 52: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/52.jpg)
![Page 53: Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar](https://reader031.fdocuments.net/reader031/viewer/2022032617/55ab1b221a28ab68268b46a1/html5/thumbnails/53.jpg)
THANK YOU!More information about frameworks, devices
and testing at www.testdroid.com