Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Using Selenium to Test Native iOS Apps
Search
Jason Carr
November 15, 2012
Technology
290
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using Selenium to Test Native iOS Apps
Jason Carr
November 15, 2012
More Decks by Jason Carr
See All by Jason Carr
The Future of Selenium for mobile web and native apps
maudineormsby
1
410
Other Decks in Technology
See All in Technology
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
220
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
120
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
580
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
770
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
150
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
110
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
180
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
920
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
170
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
190
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Discover your Explorer Soul
emna__ayadi
2
1.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Site-Speed That Sticks
csswizardry
13
1.6k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
The SEO Collaboration Effect
kristinabergwall1
1
590
Docker and Python
trallard
47
4.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
RailsConf 2023
tenderlove
30
1.6k
Designing for Timeless Needs
cassininazir
1
530
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Transcript
Using Selenium to Test Native Applications …wait, you can do
that?
Hi. I’m JASON CARR. I work at sauce LABS.
@maudineormsby …it’s a long story.
I’m a developer and contributor to SELENIUM and APPIUM
This talk is about…
This talk is about… THE PROBLEM OF IOS APP AUTOMATION
This talk is about… LESSONS LEARNED AUTOMATING APPS
This talk is about… THE RIGHT APPROACH TO TESTING NATIVE
APPS
This talk is about… THE TOOLS AVAILABLE TO TEST YOUR
APPS TODAY
This talk is about… WHAT HOPE WE HAVE FOR THE
FUTURE.
THE PROBLEM OF IOS APP AUTOMATION
“…a bit like being dropped off in a field somewhere
with no map, tools or supplies and being told you need to build a house.” -Alex Vollmer
js js Instruments.app Instruments.app App
js js Instruments.app Instruments.app App CLIENT DEVICE
UI Automation only runs in Instruments.app
Tests have to be in Javascript
No realtime interaction with tests
Hard to reuse code
One test at a time
So what have we LEARNED SO FAR?
Two attempted approaches to automation
Script/ Framework Script/ Framework Screen Capture Screen Capture App CLIENT
DEVICE
Hard to abstract
Very brittle
Hard to use with real devices
Hard to use with CI or parallelize
script script Client library Client library App CLIENT DEVICE
Requires code modification
Real devices are hard
New framework and new tests
The RIGHT WAY TO AUTOMATE IOS
Remember the testing pyramid
None
Are you writing unit tests for apps? It’s not that
hard!
Test your views appropriately
For UIWebViews use iWebDriver
Yes, yes, but NOW WHAT?
Code reuse is good.
Realtime interaction
Integrate with existing automation
Parallel tests and real devices
That sounds great, BUT HOW?
APPIUM
Open Source Can be extended
Uses webdriver API Runs with off-the-shelf client libraries Language agnostic
Real time Interact with js interpreter or client
Real devices
Works in parallel (architecturally)
No code modification
test script test script Instruments.app Instruments.app App CLIENT DEVICE Appium
Server Appium Server
Easy to get started
Clone Appium
pip install bottle
python server.py /path/to/my.app
from selenium import webdriver command_url = “http://localhost:4723/wd/hub” iphone = webdriver.DesiredCapabilities.IPHONE
driver = webdriver.Remote(command_url, iphone) fields = driver.find_elements_by_tag_name('textField’) fields[0].send_keys(3) fields[1].send_keys(4) buttons = driver.find_elements_by_tag_name('button’) buttons[0].click()
DEMO
Doesn’t support execute_script() …yet. More on this later.
1 Second delay between commands UI Automation limitation
Still uses UIAutomation ‘Accessibility’ is important
WHERE DO WE GO FROM HERE?
Implement more of the API
WebKit remote debugging protocol
Selenium Grid support
Questions? Thank you!
Resources Appium Github Repo: http://goo.gl/4E5F0 Dan Cuellar’s talk on Appium:
http://goo.gl/qgLha François Reynaud on ios-driver: http://goo.gl/pzn75 Simon Stewart’s blog on mobile testing: http://goo.gl/8wl8j