SlideShare a Scribd company logo
UI  Automation  :  A  
Primer	
Cocoaheads, Ann Arbor
October, 2013
About  Myself…	
	
Principal  Software  Developer  @  Barracuda  Networks	
Freelance  App  Developer  &  Consultant  
www.priyaontech.com	
www.lunariasoftware.com	
	
TwiIer:@rajagp	
www.priyaontech.com 2
Test  Categories	
•  Unit Testing
o  Testing from developer’s perspective.
o  Testing that a particular function is right
o  Rest of system mocked up
•  Functional Testing
o  Testing from user’s perspective.
o  Testing that system behaves right
	
Today  we  talk  about    Functional  Testing	
	
www.priyaontech.com 3
Functional  Testing  -­‐‑  
Manual	
•  Pros
o  Non programmer can do it
o  No special hardware/software required
o  Some aspects have to be manually tested – eg. the actual
rendering, user experience
•  Cons
o  Time consuming (regression, large data sets and use cases)
o  Lack of Reproducibility/ traceability (“Not sure what I did
exactly to cause the app to crash..”)
www.priyaontech.com 4
Functional  Testing  -­‐‑  
Automated	
•  Pros
o  Saves time , effort
•  Will offset the initial cost of writing the test scripts
o  Consistency / Repeatable / Traceable
o  Regression
o  Large numbers of test data sets
o  Continuous Integration
•  Cons
o  Need some programming skills
www.priyaontech.com 5
Options	
www.priyaontech.com 6
Tool	
 Platform	
 Scripting  Language	
 Technical  Details	
Calabash	
 iOS/Andoird  
(Device  &  
Simulator)	
BDD.  Feature  
descriptions  wriIen  in  
Gherkin.  Test  steps  in  
Ruby.	
Uses  Cucumber  for  driving  
tests.  A  HTTP  bounjour  server  
runs  in  your  app  and  accepts  
commands  from  test  driver  
(HTTP/JSON).  Open  Source.	
Uses  Private  APIs	
Frank	
 iOS  (Device  &  
Simulator)	
	
BDD.  Feature  
descriptions  wriIen  in  
Gherkin.  Test  steps  in  
Ruby.	
	
Uses  Cucumber  for  driving  
tests.  A  HTTP  Frank  server  
runs  in  your  app  and  accepts  
commands  from  test  driver  
over  “Franky”  protocol  (HTTP/
JSON).  Open  Source	
Uses  Private  APIs	
	
KIF	
 iOS  
(  Simulator/
device)	
Objective-­‐‑C	
 Framework  integrated  into  
app.  No  HTTP  server  or  
external  driver.  Open  Source.  
Options	
www.priyaontech.com 7
Tool	
 Platform	
 Scripting  Language	
 Technical  Details	
Fone  
Monkey/  
Monkey  
Talk	
iOS/Andoird  
(Device  &  
Simulator)  &  
Web  Apps	
JS,  Obj-­‐‑C,  monkeyTalk  
scripts	
Record  actions  using  
MonkeyTalk  console,  save/edit  
script  &  playback.  Open  
Source  .  Premium  Support  will  
cost  $$$	
We’ll  discuss  UIAutomations  today
UI  Automation	
•  Automated functional test framework
from Apple
•  UI interactions with app driven using
test scripts
•  Test scripts written in Javascript
•  Test scripts executed using
“Automation” instrument
•  Actively developed & maintained
(well….maybe)
www.priyaontech.com 8
UI  Automation	
•  Good user interaction coverage
•  Can work with no/minimal app
changes (recommend UIAccessibility)
•  Works on simulators and devices
•  Only on apps that are signed with
development profile
•  Simplicity
www.priyaontech.com 9
UI  Accessibility	
•  Informal Protocol
•  Interface to assist people with disabilities
•  Uniquely identify every element in the view
hierarchy
•  Every UIKit element can be specified to be
accessible, using "label" attribute
•  Recommended to use w/ UI Automations
o  In order to interact with an element, you need to identify it
•  Identifying element by position makes script fragile
www.priyaontech.com 10
UI  Accessibility  Rules	
•  Individual View
o  Enable Accessibility
o  Set Accessibility Label on the view
•  Container View
o  Disable Accessibility on container view
o  Enable Accessibility on every contained view
that you want accessible
o  Specify Labels for container and contained views
www.priyaontech.com 11
UI  Element  Hierarchy	
www.priyaontech.com 12
Target	
Application	
Window	
View	
 View	
UIATarget.localTarget()	
.frontMostApp()	
.mainWindow()	
[UIAElement].logElementTree()
Tuneup.js	
•  A set of Javascript utilities to facilitate writing
of UIAutomation scripts
•  Lot of convenience Wrapper functions to
handle repetitive tasks(isDeviceiPad,
isDeviceiPhone ,assertLeftButtonNamed …)
•  Enforce a structure to your test scripts –
Invoke “test” function
•  Alex Vollmer, http://www.tuneupjs.org
www.priyaontech.com 13
Demo  
	
Get  it  at  :    hIp://priyaontech.com/ndownloads	
www.priyaontech.com 14
Thank  you!  
  
Further  Reading  :  Test  iOS  Apps  with  UI  Automation  
Bug  Hunting  Made  Easy  
By  Jonathan  Penn 	
  
	
www.priyaontech.com
@rajagp
www.priyaontech.com 15
Ad

More Related Content

What's hot (20)

XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University
Shashikant Jagtap
 
Choosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for YouChoosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for You
Perfecto by Perforce
 
Test Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & ToolsTest Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & Tools
Amit Rawat
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
TestObject - Mobile Testing
 
RPA Summer School Session 2.1: Run your first UI automation
RPA Summer School Session 2.1: Run your first UI automationRPA Summer School Session 2.1: Run your first UI automation
RPA Summer School Session 2.1: Run your first UI automation
Cristina Vidu
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh Dahal
QA or the Highway
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
Dan Cuellar
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
Justin Ison
 
Advanced Appium
Advanced AppiumAdvanced Appium
Advanced Appium
Dan Cuellar
 
Selenium conference, 2016
Selenium conference, 2016Selenium conference, 2016
Selenium conference, 2016
Pooja Shah
 
Lean Quality & Engineering
Lean Quality & EngineeringLean Quality & Engineering
Lean Quality & Engineering
Mek Srunyu Stittri
 
NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework
Shashikant Jagtap
 
Espresso testing
Espresso testingEspresso testing
Espresso testing
vodqancr
 
Advance appium workshop.pptx
Advance appium workshop.pptxAdvance appium workshop.pptx
Advance appium workshop.pptx
VodqaBLR
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
Dan Hinojosa
 
Test Automation Ground Up
Test Automation Ground UpTest Automation Ground Up
Test Automation Ground Up
Kushan Shalindra Amarasiri - Technical QE Specialist
 
Test Automation failure analysis
Test Automation failure analysisTest Automation failure analysis
Test Automation failure analysis
Prashant Chaudhary
 
Tests supporting multiple mobile platforms
Tests supporting multiple mobile platformsTests supporting multiple mobile platforms
Tests supporting multiple mobile platforms
vodqancr
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
 
ISTQB Foundation and Selenium Java Automation Testing
ISTQB Foundation and Selenium Java Automation TestingISTQB Foundation and Selenium Java Automation Testing
ISTQB Foundation and Selenium Java Automation Testing
HiraQureshi22
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University
Shashikant Jagtap
 
Choosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for YouChoosing the Best Open Source Test Automation Tool for You
Choosing the Best Open Source Test Automation Tool for You
Perfecto by Perforce
 
Test Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & ToolsTest Automation Frameworks: Assumptions, Concepts & Tools
Test Automation Frameworks: Assumptions, Concepts & Tools
Amit Rawat
 
RPA Summer School Session 2.1: Run your first UI automation
RPA Summer School Session 2.1: Run your first UI automationRPA Summer School Session 2.1: Run your first UI automation
RPA Summer School Session 2.1: Run your first UI automation
Cristina Vidu
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh Dahal
QA or the Highway
 
Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016Advanced Appium: SeleniumConf UK 2016
Advanced Appium: SeleniumConf UK 2016
Dan Cuellar
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
Justin Ison
 
Selenium conference, 2016
Selenium conference, 2016Selenium conference, 2016
Selenium conference, 2016
Pooja Shah
 
NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework NSTC2019: Choosing CI Friendly Mobile Automation Framework
NSTC2019: Choosing CI Friendly Mobile Automation Framework
Shashikant Jagtap
 
Espresso testing
Espresso testingEspresso testing
Espresso testing
vodqancr
 
Advance appium workshop.pptx
Advance appium workshop.pptxAdvance appium workshop.pptx
Advance appium workshop.pptx
VodqaBLR
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
Dan Hinojosa
 
Test Automation failure analysis
Test Automation failure analysisTest Automation failure analysis
Test Automation failure analysis
Prashant Chaudhary
 
Tests supporting multiple mobile platforms
Tests supporting multiple mobile platformsTests supporting multiple mobile platforms
Tests supporting multiple mobile platforms
vodqancr
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
 
ISTQB Foundation and Selenium Java Automation Testing
ISTQB Foundation and Selenium Java Automation TestingISTQB Foundation and Selenium Java Automation Testing
ISTQB Foundation and Selenium Java Automation Testing
HiraQureshi22
 

Viewers also liked (7)

UI Test Automation Effectiveness
UI Test Automation EffectivenessUI Test Automation Effectiveness
UI Test Automation Effectiveness
SQALab
 
UI Automation Quirks
UI Automation QuirksUI Automation Quirks
UI Automation Quirks
Lucas Pang
 
Coded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the FieldCoded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the Field
Clemens Reijnen
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
Artem Nagornyi
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI Automation
Alexander Repty
 
UI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UIUI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UI
yaevents
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Gáspár Nagy
 
UI Test Automation Effectiveness
UI Test Automation EffectivenessUI Test Automation Effectiveness
UI Test Automation Effectiveness
SQALab
 
UI Automation Quirks
UI Automation QuirksUI Automation Quirks
UI Automation Quirks
Lucas Pang
 
Coded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the FieldCoded UI - Test automation Practices from the Field
Coded UI - Test automation Practices from the Field
Clemens Reijnen
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
Artem Nagornyi
 
Effectively Using UI Automation
Effectively Using UI AutomationEffectively Using UI Automation
Effectively Using UI Automation
Alexander Repty
 
UI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UIUI test automation techniques by an example of JavaFX UI
UI test automation techniques by an example of JavaFX UI
yaevents
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Gáspár Nagy
 
Ad

Similar to Introduction to UI Automation Framework (20)

Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
Justin Ison
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
CodeFest
 
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
 
Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]
Maria Carcar
 
A Modern Dive into QA Automation and Beyond
A Modern Dive into QA Automation and BeyondA Modern Dive into QA Automation and Beyond
A Modern Dive into QA Automation and Beyond
Pratik Patel
 
Matt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetMatt Eakin - The New Tester Skillset
Matt Eakin - The New Tester Skillset
QA or the Highway
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
Eing Ong
 
Automation Tools Overview
Automation Tools OverviewAutomation Tools Overview
Automation Tools Overview
Murageppa-QA
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
Ivano Malavolta
 
Appium Native Application Crawler
Appium Native Application CrawlerAppium Native Application Crawler
Appium Native Application Crawler
Justin Ison
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdf
QA or the Highway
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
Eing Ong
 
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo EuteneuerStop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
JAXLondon_Conference
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
Vishal Banthia
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
Sun Technlogies
 
Mobile Application Testing
Mobile Application Testing Mobile Application Testing
Mobile Application Testing
Shivaraj R
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar
 
How to Master Mobile Automation in QA
How to Master Mobile Automation in QAHow to Master Mobile Automation in QA
How to Master Mobile Automation in QA
Oxagile
 
Testing Android Application, Droidcon Torino
Testing Android Application, Droidcon TorinoTesting Android Application, Droidcon Torino
Testing Android Application, Droidcon Torino
Pietro Alberto Rossi
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
Justin Ison
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
CodeFest
 
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
 
Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]
Maria Carcar
 
A Modern Dive into QA Automation and Beyond
A Modern Dive into QA Automation and BeyondA Modern Dive into QA Automation and Beyond
A Modern Dive into QA Automation and Beyond
Pratik Patel
 
Matt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetMatt Eakin - The New Tester Skillset
Matt Eakin - The New Tester Skillset
QA or the Highway
 
2012 mobile testingsummit-moet
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
Eing Ong
 
Automation Tools Overview
Automation Tools OverviewAutomation Tools Overview
Automation Tools Overview
Murageppa-QA
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
Ivano Malavolta
 
Appium Native Application Crawler
Appium Native Application CrawlerAppium Native Application Crawler
Appium Native Application Crawler
Justin Ison
 
Thomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdfThomas Haver - Mobile Testing.pdf
Thomas Haver - Mobile Testing.pdf
QA or the Highway
 
2012 java one-con3648
2012 java one-con36482012 java one-con3648
2012 java one-con3648
Eing Ong
 
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo EuteneuerStop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
JAXLondon_Conference
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
Vishal Banthia
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
Sun Technlogies
 
Mobile Application Testing
Mobile Application Testing Mobile Application Testing
Mobile Application Testing
Shivaraj R
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar
 
How to Master Mobile Automation in QA
How to Master Mobile Automation in QAHow to Master Mobile Automation in QA
How to Master Mobile Automation in QA
Oxagile
 
Testing Android Application, Droidcon Torino
Testing Android Application, Droidcon TorinoTesting Android Application, Droidcon Torino
Testing Android Application, Droidcon Torino
Pietro Alberto Rossi
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
Ad

Introduction to UI Automation Framework

  • 1. UI  Automation  :  A   Primer Cocoaheads, Ann Arbor October, 2013
  • 2. About  Myself… Principal  Software  Developer  @  Barracuda  Networks Freelance  App  Developer  &  Consultant   www.priyaontech.com www.lunariasoftware.com TwiIer:@rajagp www.priyaontech.com 2
  • 3. Test  Categories •  Unit Testing o  Testing from developer’s perspective. o  Testing that a particular function is right o  Rest of system mocked up •  Functional Testing o  Testing from user’s perspective. o  Testing that system behaves right Today  we  talk  about    Functional  Testing www.priyaontech.com 3
  • 4. Functional  Testing  -­‐‑   Manual •  Pros o  Non programmer can do it o  No special hardware/software required o  Some aspects have to be manually tested – eg. the actual rendering, user experience •  Cons o  Time consuming (regression, large data sets and use cases) o  Lack of Reproducibility/ traceability (“Not sure what I did exactly to cause the app to crash..”) www.priyaontech.com 4
  • 5. Functional  Testing  -­‐‑   Automated •  Pros o  Saves time , effort •  Will offset the initial cost of writing the test scripts o  Consistency / Repeatable / Traceable o  Regression o  Large numbers of test data sets o  Continuous Integration •  Cons o  Need some programming skills www.priyaontech.com 5
  • 6. Options www.priyaontech.com 6 Tool Platform Scripting  Language Technical  Details Calabash iOS/Andoird   (Device  &   Simulator) BDD.  Feature   descriptions  wriIen  in   Gherkin.  Test  steps  in   Ruby. Uses  Cucumber  for  driving   tests.  A  HTTP  bounjour  server   runs  in  your  app  and  accepts   commands  from  test  driver   (HTTP/JSON).  Open  Source. Uses  Private  APIs Frank iOS  (Device  &   Simulator) BDD.  Feature   descriptions  wriIen  in   Gherkin.  Test  steps  in   Ruby. Uses  Cucumber  for  driving   tests.  A  HTTP  Frank  server   runs  in  your  app  and  accepts   commands  from  test  driver   over  “Franky”  protocol  (HTTP/ JSON).  Open  Source Uses  Private  APIs KIF iOS   (  Simulator/ device) Objective-­‐‑C Framework  integrated  into   app.  No  HTTP  server  or   external  driver.  Open  Source.  
  • 7. Options www.priyaontech.com 7 Tool Platform Scripting  Language Technical  Details Fone   Monkey/   Monkey   Talk iOS/Andoird   (Device  &   Simulator)  &   Web  Apps JS,  Obj-­‐‑C,  monkeyTalk   scripts Record  actions  using   MonkeyTalk  console,  save/edit   script  &  playback.  Open   Source  .  Premium  Support  will   cost  $$$ We’ll  discuss  UIAutomations  today
  • 8. UI  Automation •  Automated functional test framework from Apple •  UI interactions with app driven using test scripts •  Test scripts written in Javascript •  Test scripts executed using “Automation” instrument •  Actively developed & maintained (well….maybe) www.priyaontech.com 8
  • 9. UI  Automation •  Good user interaction coverage •  Can work with no/minimal app changes (recommend UIAccessibility) •  Works on simulators and devices •  Only on apps that are signed with development profile •  Simplicity www.priyaontech.com 9
  • 10. UI  Accessibility •  Informal Protocol •  Interface to assist people with disabilities •  Uniquely identify every element in the view hierarchy •  Every UIKit element can be specified to be accessible, using "label" attribute •  Recommended to use w/ UI Automations o  In order to interact with an element, you need to identify it •  Identifying element by position makes script fragile www.priyaontech.com 10
  • 11. UI  Accessibility  Rules •  Individual View o  Enable Accessibility o  Set Accessibility Label on the view •  Container View o  Disable Accessibility on container view o  Enable Accessibility on every contained view that you want accessible o  Specify Labels for container and contained views www.priyaontech.com 11
  • 12. UI  Element  Hierarchy www.priyaontech.com 12 Target Application Window View View UIATarget.localTarget() .frontMostApp() .mainWindow() [UIAElement].logElementTree()
  • 13. Tuneup.js •  A set of Javascript utilities to facilitate writing of UIAutomation scripts •  Lot of convenience Wrapper functions to handle repetitive tasks(isDeviceiPad, isDeviceiPhone ,assertLeftButtonNamed …) •  Enforce a structure to your test scripts – Invoke “test” function •  Alex Vollmer, http://www.tuneupjs.org www.priyaontech.com 13
  • 14. Demo   Get  it  at  :    hIp://priyaontech.com/ndownloads www.priyaontech.com 14
  • 15. Thank  you!     Further  Reading  :  Test  iOS  Apps  with  UI  Automation   Bug  Hunting  Made  Easy   By  Jonathan  Penn   www.priyaontech.com @rajagp www.priyaontech.com 15