Automated Testing with GHUnit and KIF

Michele Titolo
Michele TitoloComputers ¯\_(ツ)_/¯ at Square
Automated Testing
with GHUnit and KIF
             Michele Titolo
Sr. Mobile Engineer / Prolific Interactive
            @micheletitolo
Automated Testing with GHUnit and KIF
Why test your code?
Automated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIF
Types of Frameworks
Types of Frameworks
Types of Frameworks

• Unit Testing
Types of Frameworks

• Unit Testing
• UI Testing
Choosing Frameworks
Unit
Unit
Unit


• OCUnit/SenTestKit
Unit


• OCUnit/SenTestKit
• GHUnit
UI
UI
UI

• UIAutomation
UI

• UIAutomation
• Frank
UI

• UIAutomation
• Frank
• KIF
Automated Testing with GHUnit and KIF
GHUnit
Demo
Setup
GHUnit has it’s own target
GHTestCase
Automation
Apple keeps breaking testing from CLI
JUnit test results
Gotchas
Vertical slices of functionality
Apple breaks things
UI Testing is difficult
KIF
Demo
Setup
KIF has it’s own target
KIFTestController
KIFTestScenario & KIFTestStep
Automation
ios-sim
https://github.com/phonegap/ios-sim
/usr/local/bin/ios-sim launch $APPFILE --family ipad >
! ! /tmp/KIF-ipad-$$.out 2>&1
Test Output
cp "`grep "JUNIT XML RESULTS AT " /tmp/KIF-ipad-$$.out | sed
's/.*JUNIT XML RESULTS AT //'`" 'test-reports/KIF-ipad-
results.xml'
Automated Testing with GHUnit and KIF
Automated Testing with GHUnit and KIF
Gotchas
[scenario addStep:[KIFTestStep stepToWaitForTimeInterval:1
! description:@"wait"]];


[scenario addStep:[KIFTestStep !
! stepToWaitForViewWithAccessibilityLabel:@"Table"]];
[KIFTestScenario setDefaultStepsToSetUp:[KIFTestStep
! setupSteps]];
[scenario addStepsFromArray:[LoginTestStep
! stepsToLoginWithEmail:TEST_EMAIL
! password:TEST_PASSWORD]];
[scenario addStep:[KIFTestStep !! ! ! ! ! ! !
! stepToScrollToItemWithAccessibilityLabel:@"Settings"]];
Automated Testing with GHUnit and KIF
In Summary
Do tests help you write
better code?
Do tests help you write
better code?
Yes.
Do writing tests add to
dev time?
Do writing tests add to
dev time?
Yes.
Is testing worth the
extra time?
Is testing worth the
extra time?
Absolutely.
The End
https://github.com/mtitolo/UICatalog-Tests




             Michele Titolo
             @micheletitolo
1 of 60

Recommended

Ios ui automation test framework by
Ios ui automation test frameworkIos ui automation test framework
Ios ui automation test frameworkWinter Hong
837 views29 slides
UI Testing with Earl Grey by
UI Testing with Earl GreyUI Testing with Earl Grey
UI Testing with Earl GreyShyam Bhat
5.6K views31 slides
Getting Started with XCTest and XCUITest for iOS App Testing by
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
13K views30 slides
XCUITest for iOS App Testing and how to test with Xcode by
XCUITest for iOS App Testing and how to test with XcodeXCUITest for iOS App Testing and how to test with Xcode
XCUITest for iOS App Testing and how to test with XcodepCloudy
942 views18 slides
How To Build iOS Apps Without interface Builder by
How To Build iOS Apps Without interface BuilderHow To Build iOS Apps Without interface Builder
How To Build iOS Apps Without interface Builderdasdom
1.2K views9 slides
Mobile App Testing ScanAgile 2012 by
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Daniel Knott
238 views41 slides

More Related Content

What's hot

Best Strategy for Developing App Architecture and High Quality App by
Best Strategy for Developing App Architecture and High Quality AppBest Strategy for Developing App Architecture and High Quality App
Best Strategy for Developing App Architecture and High Quality AppFlurry, Inc.
1.3K views69 slides
Continous UI testing with Espresso and Jenkins by
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsSylwester Madej
13.6K views30 slides
Tutorial 1 by
Tutorial 1Tutorial 1
Tutorial 1Bible Tang
297 views56 slides
Full Stack Flutter Testing by
Full Stack Flutter Testing Full Stack Flutter Testing
Full Stack Flutter Testing Shashikant Jagtap
1.2K views17 slides
Android course (lecture2) by
Android course (lecture2)Android course (lecture2)
Android course (lecture2)Amira Elsayed Ismail
665 views34 slides
Angular EE - Special Workshop by Nir Kaufman by
Angular EE - Special Workshop by Nir KaufmanAngular EE - Special Workshop by Nir Kaufman
Angular EE - Special Workshop by Nir KaufmanNir Kaufman
1.3K views39 slides

What's hot(20)

Best Strategy for Developing App Architecture and High Quality App by Flurry, Inc.
Best Strategy for Developing App Architecture and High Quality AppBest Strategy for Developing App Architecture and High Quality App
Best Strategy for Developing App Architecture and High Quality App
Flurry, Inc.1.3K views
Continous UI testing with Espresso and Jenkins by Sylwester Madej
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and Jenkins
Sylwester Madej13.6K views
Angular EE - Special Workshop by Nir Kaufman by Nir Kaufman
Angular EE - Special Workshop by Nir KaufmanAngular EE - Special Workshop by Nir Kaufman
Angular EE - Special Workshop by Nir Kaufman
Nir Kaufman1.3K views
React native: building shared components for Android and iOS by Calum Gathergood
React native: building shared components for Android and iOSReact native: building shared components for Android and iOS
React native: building shared components for Android and iOS
Calum Gathergood517 views
Android Test Pyramid - Ágiles 2013 by Rafael Portela
Android Test Pyramid - Ágiles 2013Android Test Pyramid - Ágiles 2013
Android Test Pyramid - Ágiles 2013
Rafael Portela780 views
Calabash my understanding by FARHAN SUMBUL
Calabash my understandingCalabash my understanding
Calabash my understanding
FARHAN SUMBUL4.5K views
"I have a framework idea" - Repeat less, share more. by Fabio Milano
"I have a framework idea" - Repeat less, share more."I have a framework idea" - Repeat less, share more.
"I have a framework idea" - Repeat less, share more.
Fabio Milano1.3K views
Comparison between Eclipse and Android Studio for Android Development by Willow Cheng
Comparison between Eclipse and Android Studio for Android DevelopmentComparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android Development
Willow Cheng13.2K views
Mobile automation using Appium by Saroj Singh
Mobile automation using AppiumMobile automation using Appium
Mobile automation using Appium
Saroj Singh70 views
Future of Mobile Automation, Appium Steals it by Srinivasan Sekar
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
Srinivasan Sekar202 views
Android 3.1 - Portland Code Camp 2011 by sullis
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
sullis761 views

Similar to Automated Testing with GHUnit and KIF

Suparna - Shift Left Testing in Mobile.pptx by
Suparna - Shift Left Testing in Mobile.pptxSuparna - Shift Left Testing in Mobile.pptx
Suparna - Shift Left Testing in Mobile.pptxSuparnaK3
92 views30 slides
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h by
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYury M
345 views83 slides
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI... by
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...Riccardo Coppola
29 views75 slides
Unit testing by
Unit testingUnit testing
Unit testingLeonardo Balter
5.1K views14 slides
Shift Left Mobile Application Testing by
Shift Left Mobile Application TestingShift Left Mobile Application Testing
Shift Left Mobile Application TestingJosiah Renaudin
738 views16 slides
Quality in dev ops east 2017 by
Quality in dev ops east 2017Quality in dev ops east 2017
Quality in dev ops east 2017Amir Rozenberg
171 views30 slides

Similar to Automated Testing with GHUnit and KIF(20)

Suparna - Shift Left Testing in Mobile.pptx by SuparnaK3
Suparna - Shift Left Testing in Mobile.pptxSuparna - Shift Left Testing in Mobile.pptx
Suparna - Shift Left Testing in Mobile.pptx
SuparnaK392 views
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h by Yury M
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14hYuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
YuryMakedonov_GUI_TestAutomation_QAI_Canada_2007_14h
Yury M345 views
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI... by Riccardo Coppola
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Automated Generation, Evolution and Maintenance: a perspective for mobile GUI...
Riccardo Coppola29 views
Shift Left Mobile Application Testing by Josiah Renaudin
Shift Left Mobile Application TestingShift Left Mobile Application Testing
Shift Left Mobile Application Testing
Josiah Renaudin738 views
Quality in dev ops east 2017 by Amir Rozenberg
Quality in dev ops east 2017Quality in dev ops east 2017
Quality in dev ops east 2017
Amir Rozenberg171 views
Release Automation: Better Quality, Faster Deployment, Amazing ROI by TechWell
Release Automation: Better Quality, Faster Deployment, Amazing ROIRelease Automation: Better Quality, Faster Deployment, Amazing ROI
Release Automation: Better Quality, Faster Deployment, Amazing ROI
TechWell345 views
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines by Ching-Hwa Yu
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 PipelinesNIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
NIWeek 2017 - Automated Test of LabVIEW FPGA Code: CI and Jenkins 2 Pipelines
Ching-Hwa Yu2.6K views
Suparna - XCUITest by SuparnaK3
Suparna - XCUITestSuparna - XCUITest
Suparna - XCUITest
SuparnaK319 views
2012 mobile testingsummit-moet by Eing Ong
2012 mobile testingsummit-moet2012 mobile testingsummit-moet
2012 mobile testingsummit-moet
Eing Ong493 views
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys by Dynatrace
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code DeploysOur DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Dynatrace725 views
Eclipse Testing Day 2010. Xored Q7 by platoff
Eclipse Testing Day 2010. Xored Q7Eclipse Testing Day 2010. Xored Q7
Eclipse Testing Day 2010. Xored Q7
platoff743 views
Woodoo - an open source mobile testing framework by Daniel Ben yosef
Woodoo - an open source mobile testing frameworkWoodoo - an open source mobile testing framework
Woodoo - an open source mobile testing framework
Daniel Ben yosef1.2K views
Katalon Studio - A Codeless Automation Tool.pdf by Knoldus Inc.
Katalon Studio - A Codeless Automation Tool.pdfKatalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdf
Knoldus Inc.875 views
2012 java one-con3648 by Eing Ong
2012 java one-con36482012 java one-con3648
2012 java one-con3648
Eing Ong787 views
Fashionable XCUITest for iOS Apps by Shashikant Jagtap by Sauce Labs
Fashionable XCUITest for iOS Apps by Shashikant JagtapFashionable XCUITest for iOS Apps by Shashikant Jagtap
Fashionable XCUITest for iOS Apps by Shashikant Jagtap
Sauce Labs162 views
Ci2d - The Colossal Hood For Agile Development And Deployment by Naveen S.R
Ci2d - The Colossal Hood For Agile Development And DeploymentCi2d - The Colossal Hood For Agile Development And Deployment
Ci2d - The Colossal Hood For Agile Development And Deployment
Naveen S.R548 views
EEF : Sexy Properties, Wizards and Views - EclipseCon 11 by Chauvin Mariot
EEF : Sexy Properties, Wizards and Views - EclipseCon 11EEF : Sexy Properties, Wizards and Views - EclipseCon 11
EEF : Sexy Properties, Wizards and Views - EclipseCon 11
Chauvin Mariot5K views

More from Michele Titolo

Writing Design Docs for Wide Audiences by
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide AudiencesMichele Titolo
93 views43 slides
Beam Me Up: Voyaging into Big Data by
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big DataMichele Titolo
381 views90 slides
APIs: The Good, The Bad, The Ugly by
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The UglyMichele Titolo
155 views98 slides
Tackling the Big, Impossible Project by
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible ProjectMichele Titolo
534 views39 slides
No Microservice is an Island by
No Microservice is an IslandNo Microservice is an Island
No Microservice is an IslandMichele Titolo
611 views183 slides
From iOS to Distributed Systems by
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed SystemsMichele Titolo
944 views101 slides

More from Michele Titolo(20)

Writing Design Docs for Wide Audiences by Michele Titolo
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide Audiences
Michele Titolo93 views
Beam Me Up: Voyaging into Big Data by Michele Titolo
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big Data
Michele Titolo381 views
APIs: The Good, The Bad, The Ugly by Michele Titolo
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The Ugly
Michele Titolo155 views
Tackling the Big, Impossible Project by Michele Titolo
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible Project
Michele Titolo534 views
No Microservice is an Island by Michele Titolo
No Microservice is an IslandNo Microservice is an Island
No Microservice is an Island
Michele Titolo611 views
From iOS to Distributed Systems by Michele Titolo
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed Systems
Michele Titolo944 views
More than po: Debugging in LLDB by Michele Titolo
More than po: Debugging in LLDBMore than po: Debugging in LLDB
More than po: Debugging in LLDB
Michele Titolo2.6K views
Swift Generics in Theory and Practice by Michele Titolo
Swift Generics in Theory and PracticeSwift Generics in Theory and Practice
Swift Generics in Theory and Practice
Michele Titolo1.8K views
Making friendly-microservices by Michele Titolo
Making friendly-microservicesMaking friendly-microservices
Making friendly-microservices
Michele Titolo1.1K views
More Than po: Debugging in LLDB @ CocoaConf SJ 2015 by Michele Titolo
More Than po: Debugging in LLDB @ CocoaConf SJ 2015More Than po: Debugging in LLDB @ CocoaConf SJ 2015
More Than po: Debugging in LLDB @ CocoaConf SJ 2015
Michele Titolo761 views
More than `po`: Debugging in lldb by Michele Titolo
More than `po`: Debugging in lldbMore than `po`: Debugging in lldb
More than `po`: Debugging in lldb
Michele Titolo9.1K views
Cocoa Design Patterns in Swift by Michele Titolo
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in Swift
Michele Titolo9.1K views
Mastering the Project File (AltConf) by Michele Titolo
Mastering the Project File (AltConf)Mastering the Project File (AltConf)
Mastering the Project File (AltConf)
Michele Titolo1.8K views

Recently uploaded

Transcript: The Details of Description Techniques tips and tangents on altern... by
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...BookNet Canada
130 views15 slides
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...NUS-ISS
28 views70 slides
20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
28 views73 slides
Java Platform Approach 1.0 - Picnic Meetup by
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic MeetupRick Ossendrijver
25 views39 slides
The details of description: Techniques, tips, and tangents on alternative tex... by
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...BookNet Canada
121 views24 slides
Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
17 views1 slide

Recently uploaded(20)

Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada130 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS28 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta15 views
.conf Go 2023 - Data analysis as a routine by Splunk
.conf Go 2023 - Data analysis as a routine.conf Go 2023 - Data analysis as a routine
.conf Go 2023 - Data analysis as a routine
Splunk93 views
AI: mind, matter, meaning, metaphors, being, becoming, life values by Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
Future of Learning - Yap Aye Wee.pdf by NUS-ISS
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdf
NUS-ISS41 views
Future of Learning - Khoong Chan Meng by NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS33 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
Attacking IoT Devices from a Web Perspective - Linux Day by Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 views
Understanding GenAI/LLM and What is Google Offering - Felix Goh by NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS41 views

Automated Testing with GHUnit and KIF