SlideShare uma empresa Scribd logo
1 de 19
The Chronicle of iPhone Automation From Frank to UISpec to UIAutomation to KIF HinlingYeung QA Automation Engineer from Trulia, Inc
Background iPhone app iPad app Android app Mobile site more phone/device apps to come in a short future Mobile traffic keeps increasing
To help maintain our sanity… Let’s automate some of our devices!
Now let’s get back to the topic. After watching Pete Hodgson’s presentation about Frank, I was very hopeful about iPhone automation…
Then I follow the online documentations… And successfully setup up Frank!
However, when I actually start automating my first test case. I hit my first wall:
mbp-1350:cucumber hyeung$ cucumber features/login.feature Feature:     As an iOS developer    I want to click the Log in button    So I can see the warning message of missing email address and password   Scenario:                             # features/login.feature:6 PING FAILED!!!! FRANK!    Given I launch the app              # features/step_definitions/launch_steps.rb:1     When I wait 30 seconds              # features/step_definitions/frank_steps.rb:1     When I touch the "No Thanks" Button # features/step_definitions/frank_steps.rb:29       end of file reached (EOFError)       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:62:in `timeout'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:93:in `timeout'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1050:in `request'       /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:543:in `start'       ./features/step_definitions/frank_steps.rb:30:in `/^I touch the "([^quot;]*)" Button$/'       features/login.feature:9:in `When I touch the "No Thanks" Button' Failing Scenarios: cucumber features/login.feature:6 # Scenario:  1 scenario (1 failed) 3 steps (1 failed, 2 passed) 0m37.113s
So… Keep on debugging the ruby scripts, Frank, and possibly UISpec OR Let’s get to the bottom: UISpec
Then I start setting up UISpec… adding libraries… Adding dependencies… Adding header files… Adding more header files… Oops…linking error. Then adding .m files… Add some test code: -(void)itShouldShowErrorMessageAfterClickingLogInButton {     [[app.find.labeltext:@"For Sale"] flash];     [[app.find.labeltext:@"For Rent"] flash];     [[app.find.labeltext:@"My Trulia"] flash];     … }
Looks Really Promising… Let’s try “touch” it instead of just “flash” it. Then I hit another wall:  “touch” results in no reaction or EXC_BAD_ACESS error
Sigh…
I really need something that just work! Then I talked to a friend of mine who works in the MobileMe automation team in Apple: Me: What do you use to automate your iphone app? Friend: Javascript Me: Javascript? You mean Javascript JAVASCRIPT? The one we use on the browser? Friend: yes. Check the apple dev center. Results: UIAutomation from Apple
UIAutomation with Instruments http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/ Add some accessibilityLabels Setup the Instruments template Write some Javascript A little counter intuitive but click “record” and it starts running. And it works!
Let’s integrate the tests with Jenkins I hit another wall: There is no good way to kick off the tests from command line and integrate my results to Jenkins!
Then I found KIF… KIF – Keep It Functional By Square (Eric Firestone) -- https://github.com/square/KIF Blog: http://corner.squareup.com/2011/07/ios-integration-testing.html Couple linking errors later…
YEAH! It actually works from end to end with simple enough setup. With instructions to start the test in command line And quits after the test finish running. And output results to the console. Results are not in a CI-ready format but THAT’S OK IF THAT’S THE ONLY PROBLEM!
Final Solution KIF Add accessibilityLabel to textField, Button, and View isAccessibilityElement = YES Symbiote from Frank to inspect the labels on app WaxSim to launch app from command line Modify the KIF log to output test results that can be turned into standard junit result format
The Chronicle of iPhone Automation -- From Frank to UISpec to UIAutomation to KIF

Mais conteúdo relacionado

Mais procurados

Cross-Platform Mobile Test Automation Using Appium
Cross-Platform Mobile Test Automation Using AppiumCross-Platform Mobile Test Automation Using Appium
Cross-Platform Mobile Test Automation Using AppiumJosiah Renaudin
 
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014Andrew McElroy
 
Falsy Values - Warsaw 2011
Falsy Values - Warsaw 2011Falsy Values - Warsaw 2011
Falsy Values - Warsaw 2011Brian LeRoux
 
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowSauce Labs
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - AppiumMaria Machlowska
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Sauce Labs
 
Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore kareerme
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrumSyam Sasi
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With RobotframeworkSyam Sasi
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with AppiumSauce Labs
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumBugRaptors
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaEdureka!
 
What is FED
What is FEDWhat is FED
What is FEDSam Lee
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAndrii Dzynia
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile appsAleksejs Trescalins
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev ConferenceIsaac Murchie
 
Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itSrinivasan Sekar
 

Mais procurados (20)

Cross-Platform Mobile Test Automation Using Appium
Cross-Platform Mobile Test Automation Using AppiumCross-Platform Mobile Test Automation Using Appium
Cross-Platform Mobile Test Automation Using Appium
 
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
 
Falsy Values - Warsaw 2011
Falsy Values - Warsaw 2011Falsy Values - Warsaw 2011
Falsy Values - Warsaw 2011
 
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)
 
Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore Intro to Laravel 4 : By Chris Moore
Intro to Laravel 4 : By Chris Moore
 
Phonegap 2.x
Phonegap 2.xPhonegap 2.x
Phonegap 2.x
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
 
What is FED
What is FEDWhat is FED
What is FED
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps
 
Appium workship, Mobile Web+Dev Conference
Appium workship,  Mobile Web+Dev ConferenceAppium workship,  Mobile Web+Dev Conference
Appium workship, Mobile Web+Dev Conference
 
Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
 

Semelhante a The Chronicle of iPhone Automation -- From Frank to UISpec to UIAutomation to KIF

[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with AppiumSrijan Technologies
 
How to xcode in teams (without killing anyone) - #supengineering
How to xcode in teams (without killing anyone) - #supengineeringHow to xcode in teams (without killing anyone) - #supengineering
How to xcode in teams (without killing anyone) - #supengineeringJames Campbell
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhoneErin Dees
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software developmentNick Galbreath
 
Put an end to regression with codeception testing
Put an end to regression with codeception testingPut an end to regression with codeception testing
Put an end to regression with codeception testingJoe Ferguson
 
Mobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & HelpersMobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & HelpersRobin Hawkes
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System RequirementsLaura Arrigo
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorialLokesh Agrawal
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory TestingJustin Ison
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
Justin Ison
Justin IsonJustin Ison
Justin IsonCodeFest
 
Connecting with the enterprise - The how and why of connecting to Enterprise ...
Connecting with the enterprise - The how and why of connecting to Enterprise ...Connecting with the enterprise - The how and why of connecting to Enterprise ...
Connecting with the enterprise - The how and why of connecting to Enterprise ...Kevin Poorman
 
How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?Flutter Agency
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...Paul Jensen
 
iOS Automation Frameworks evaluation
iOS Automation Frameworks evaluationiOS Automation Frameworks evaluation
iOS Automation Frameworks evaluationSerghei Moret
 
iPhone Development: Zero to Sixty
iPhone Development: Zero to SixtyiPhone Development: Zero to Sixty
iPhone Development: Zero to SixtyThomas Swift
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testingsgleadow
 
FAKE (F# Make) & Automation
FAKE (F# Make) & AutomationFAKE (F# Make) & Automation
FAKE (F# Make) & AutomationSergey Tihon
 
Loadnrun: UKIUA 2010 Presentation
Loadnrun: UKIUA 2010 PresentationLoadnrun: UKIUA 2010 Presentation
Loadnrun: UKIUA 2010 Presentationroydealsimon
 

Semelhante a The Chronicle of iPhone Automation -- From Frank to UISpec to UIAutomation to KIF (20)

[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
How to xcode in teams (without killing anyone) - #supengineering
How to xcode in teams (without killing anyone) - #supengineeringHow to xcode in teams (without killing anyone) - #supengineering
How to xcode in teams (without killing anyone) - #supengineering
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software development
 
Put an end to regression with codeception testing
Put an end to regression with codeception testingPut an end to regression with codeception testing
Put an end to regression with codeception testing
 
Mobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & HelpersMobile App Development - Pitfalls & Helpers
Mobile App Development - Pitfalls & Helpers
 
Doran-C4L2010
Doran-C4L2010Doran-C4L2010
Doran-C4L2010
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System Requirements
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorial
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
 
Connecting with the enterprise - The how and why of connecting to Enterprise ...
Connecting with the enterprise - The how and why of connecting to Enterprise ...Connecting with the enterprise - The how and why of connecting to Enterprise ...
Connecting with the enterprise - The how and why of connecting to Enterprise ...
 
How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?How To Run/Test Flutter App On a Real Device?
How To Run/Test Flutter App On a Real Device?
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
iOS Automation Frameworks evaluation
iOS Automation Frameworks evaluationiOS Automation Frameworks evaluation
iOS Automation Frameworks evaluation
 
iPhone Development: Zero to Sixty
iPhone Development: Zero to SixtyiPhone Development: Zero to Sixty
iPhone Development: Zero to Sixty
 
Frank iOS Testing
Frank iOS TestingFrank iOS Testing
Frank iOS Testing
 
FAKE (F# Make) & Automation
FAKE (F# Make) & AutomationFAKE (F# Make) & Automation
FAKE (F# Make) & Automation
 
Loadnrun: UKIUA 2010 Presentation
Loadnrun: UKIUA 2010 PresentationLoadnrun: UKIUA 2010 Presentation
Loadnrun: UKIUA 2010 Presentation
 

Último

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

The Chronicle of iPhone Automation -- From Frank to UISpec to UIAutomation to KIF

  • 1. The Chronicle of iPhone Automation From Frank to UISpec to UIAutomation to KIF HinlingYeung QA Automation Engineer from Trulia, Inc
  • 2. Background iPhone app iPad app Android app Mobile site more phone/device apps to come in a short future Mobile traffic keeps increasing
  • 3. To help maintain our sanity… Let’s automate some of our devices!
  • 4. Now let’s get back to the topic. After watching Pete Hodgson’s presentation about Frank, I was very hopeful about iPhone automation…
  • 5. Then I follow the online documentations… And successfully setup up Frank!
  • 6. However, when I actually start automating my first test case. I hit my first wall:
  • 7. mbp-1350:cucumber hyeung$ cucumber features/login.feature Feature: As an iOS developer I want to click the Log in button So I can see the warning message of missing email address and password Scenario: # features/login.feature:6 PING FAILED!!!! FRANK! Given I launch the app # features/step_definitions/launch_steps.rb:1 When I wait 30 seconds # features/step_definitions/frank_steps.rb:1 When I touch the "No Thanks" Button # features/step_definitions/frank_steps.rb:29 end of file reached (EOFError) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:62:in `timeout' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:93:in `timeout' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2020:in `read_status_line' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2009:in `read_new' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1050:in `request' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:543:in `start' ./features/step_definitions/frank_steps.rb:30:in `/^I touch the "([^quot;]*)" Button$/' features/login.feature:9:in `When I touch the "No Thanks" Button' Failing Scenarios: cucumber features/login.feature:6 # Scenario: 1 scenario (1 failed) 3 steps (1 failed, 2 passed) 0m37.113s
  • 8. So… Keep on debugging the ruby scripts, Frank, and possibly UISpec OR Let’s get to the bottom: UISpec
  • 9. Then I start setting up UISpec… adding libraries… Adding dependencies… Adding header files… Adding more header files… Oops…linking error. Then adding .m files… Add some test code: -(void)itShouldShowErrorMessageAfterClickingLogInButton { [[app.find.labeltext:@"For Sale"] flash]; [[app.find.labeltext:@"For Rent"] flash]; [[app.find.labeltext:@"My Trulia"] flash]; … }
  • 10. Looks Really Promising… Let’s try “touch” it instead of just “flash” it. Then I hit another wall: “touch” results in no reaction or EXC_BAD_ACESS error
  • 12. I really need something that just work! Then I talked to a friend of mine who works in the MobileMe automation team in Apple: Me: What do you use to automate your iphone app? Friend: Javascript Me: Javascript? You mean Javascript JAVASCRIPT? The one we use on the browser? Friend: yes. Check the apple dev center. Results: UIAutomation from Apple
  • 13. UIAutomation with Instruments http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/ Add some accessibilityLabels Setup the Instruments template Write some Javascript A little counter intuitive but click “record” and it starts running. And it works!
  • 14.
  • 15. Let’s integrate the tests with Jenkins I hit another wall: There is no good way to kick off the tests from command line and integrate my results to Jenkins!
  • 16. Then I found KIF… KIF – Keep It Functional By Square (Eric Firestone) -- https://github.com/square/KIF Blog: http://corner.squareup.com/2011/07/ios-integration-testing.html Couple linking errors later…
  • 17. YEAH! It actually works from end to end with simple enough setup. With instructions to start the test in command line And quits after the test finish running. And output results to the console. Results are not in a CI-ready format but THAT’S OK IF THAT’S THE ONLY PROBLEM!
  • 18. Final Solution KIF Add accessibilityLabel to textField, Button, and View isAccessibilityElement = YES Symbiote from Frank to inspect the labels on app WaxSim to launch app from command line Modify the KIF log to output test results that can be turned into standard junit result format