SlideShare a Scribd company logo
1 of 53
Download to read offline
Friday, 18 February 2011
Testing
                            iOS apps
                           with Frank
                             Stewart Gleadow


Friday, 18 February 2011
why
                           	

 have
                           	

 	

 tests?


Friday, 18 February 2011
why
                           	

 have
                           	

 	

 tests?


Friday, 18 February 2011
Testing Approaches



Friday, 18 February 2011
Friday, 18 February 2011
“It seems to
                   be working”
Friday, 18 February 2011
“Nothing is
 obviously broken”
Friday, 18 February 2011
Testing iPhone Apps


                                 iPhone App




Friday, 18 February 2011
iPhone App




                             Server

Friday, 18 February 2011
iPhone App




                                        Done
                             Server

Friday, 18 February 2011
Does MVC help?



Friday, 18 February 2011
UIView


            UIViewController


                                    Model


                           Server
Friday, 18 February 2011
UIView


            UIViewController


                                    Model


                           Server
Friday, 18 February 2011
UIView


            UIViewController


                                    Model


                           Server
Friday, 18 February 2011
UIView


            UIViewController


                           Done     Model


                           Server
Friday, 18 February 2011
UIViewController   UIView




Friday, 18 February 2011
UIViewController         UIView

                           50% of iPhone code?



Friday, 18 February 2011
Potential Testing Tools

                                        hmmm...




Friday, 18 February 2011
Potential Testing Tools

                     • Frank and UISpec   hmmm...




Friday, 18 February 2011
Potential Testing Tools

                     • Frank and UISpec   hmmm...
                     • Sikuli



Friday, 18 February 2011
Potential Testing Tools

                     • Frank and UISpec   hmmm...
                     • Sikuli
                     • FoneMonkey


Friday, 18 February 2011
Potential Testing Tools

                     • Frank and UISpec    hmmm...
                     • Sikuli
                     • FoneMonkey
                     • Brominet or iCuke

Friday, 18 February 2011
Potential Testing Tools

                     • Frank and UISpec    hmmm...
                     • Sikuli
                     • FoneMonkey
                     • Brominet or iCuke
                     • UIAutomation
Friday, 18 February 2011
UISpec




Friday, 18 February 2011
UISpec


    - (void)itShouldHaveDefaultUsers;
    {
        [[app.tableView.label text:@"User"] should].exist;
    }




Friday, 18 February 2011
UISpec




Friday, 18 February 2011
Cucumber



Friday, 18 February 2011
Cucumber




Friday, 18 February 2011
Cucumber

                           Scenario: [name of the scenario]




Friday, 18 February 2011
Cucumber

                           Scenario: [name of the scenario]
                              Given [some statement]




Friday, 18 February 2011
Cucumber

                           Scenario: [name of the scenario]
                              Given [some statement]
                              When [some action]




Friday, 18 February 2011
Cucumber

                           Scenario: [name of the scenario]
                              Given [some statement]
                              When [some action]
                              Then [some expected result]




Friday, 18 February 2011
Cucumber

                           Scenario: [name of the scenario]
                              Given [some statement]
                              When [some action]
                              Then [some expected result]
                              And [another expectation]


Friday, 18 February 2011
to be perfectly Frank...



Friday, 18 February 2011
Tests

                           iPhone
                             App


Friday, 18 February 2011
Tests
                                                  UISpec
                           Cucumber / Ruby
                                             ?
                                                 iPhone
                                                   App


Friday, 18 February 2011
Tests                              Frank
                                             Server



                                                  UISpec
                           Cucumber / Ruby

                                             iPhone
                                               App


Friday, 18 February 2011
Tests                              Frank
                                             Driver
                                                      Frank
                                                      Server



                                                           UISpec
                           Cucumber / Ruby

                                                      iPhone
                                                        App


Friday, 18 February 2011
Tests                              Frank
                                             Driver
                                                                  Frank
                                                                  Server
                                                      “frankly”

                                                                       UISpec
                           Cucumber / Ruby

                                                                  iPhone
                                                                    App


Friday, 18 February 2011
Frank
                           uses
                           accessibility
                           labels


Friday, 18 February 2011
frankly.my_dear       do |i|
           dont_give_a_damn!
         end




Friday, 18 February 2011
frankly.my_dear            do |i|
           dont_give_a_damn!
         end




                           UISpec
                    UIQuery

                           Frank
                       Frankly
Friday, 18 February 2011
frankly.my_dear             do |i|
           dont_give_a_damn!
         end




                           UISpec
                    UIQuery         [app.tableView.label text:@"User"];




                           Frank
                       Frankly
Friday, 18 February 2011
frankly.my_dear             do |i|
           dont_give_a_damn!
         end




                           UISpec
                    UIQuery         [app.tableView.label text:@"User"];




                           Frank
                       Frankly      app tableView label text:’User’


Friday, 18 February 2011
Friday, 18 February 2011
Frank Steps
   Scenario: default users should be present at startup

            When I start the app

              Then I should see “Users”




Friday, 18 February 2011
Frank Steps
   Scenario: default users should be present at startup

            When I start the app

              Then I should see “Users”



          Then /^I should see "([^"]*)"$/ do |expected_mark|

               check_element_exists("view marked:'#{expected_mark}'")

          end




Friday, 18 February 2011
Demo



Friday, 18 February 2011
The Road
                            Ahead




Friday, 18 February 2011
Stewart Gleadow

                           sgleadow@thoughtworks.com

                                 @stewgleadow




Friday, 18 February 2011
References
   •       github.com/moredip/frank & http://groups.google.com/group/frank-discuss

   •       code.google.com/p/uispec & http://groups.google.com/group/uispec

   •       softnoise.wordpress.com/2010/11/14/ios-setting-up-a-test-environment/

   •       cukes.info

   •       cuke4ninja.com

   •       The RSpec Book




Friday, 18 February 2011
Images

                     •     http://www.myfreewallpapers.net/movies/pages/
                           frankenstein-02.shtml

                     •     http://www.workbloom.net/wp-content/uploads/2009/09/
                           road-ahead.jpg

                     •     http://upload.wikimedia.org/wikipedia/commons/archive/
                           0/07/20090605224904!IMac_aluminium.png

                     •     http://themachoresponse.blogspot.com/2010/03/frankly-my-
                           dear-i-dont-give-damn.html



Friday, 18 February 2011

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

iOS Testing with Frank

  • 2. Testing iOS apps with Frank Stewart Gleadow Friday, 18 February 2011
  • 3. why have tests? Friday, 18 February 2011
  • 4. why have tests? Friday, 18 February 2011
  • 7. “It seems to be working” Friday, 18 February 2011
  • 8. “Nothing is obviously broken” Friday, 18 February 2011
  • 9. Testing iPhone Apps iPhone App Friday, 18 February 2011
  • 10. iPhone App Server Friday, 18 February 2011
  • 11. iPhone App Done Server Friday, 18 February 2011
  • 12. Does MVC help? Friday, 18 February 2011
  • 13. UIView UIViewController Model Server Friday, 18 February 2011
  • 14. UIView UIViewController Model Server Friday, 18 February 2011
  • 15. UIView UIViewController Model Server Friday, 18 February 2011
  • 16. UIView UIViewController Done Model Server Friday, 18 February 2011
  • 17. UIViewController UIView Friday, 18 February 2011
  • 18. UIViewController UIView 50% of iPhone code? Friday, 18 February 2011
  • 19. Potential Testing Tools hmmm... Friday, 18 February 2011
  • 20. Potential Testing Tools • Frank and UISpec hmmm... Friday, 18 February 2011
  • 21. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli Friday, 18 February 2011
  • 22. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli • FoneMonkey Friday, 18 February 2011
  • 23. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli • FoneMonkey • Brominet or iCuke Friday, 18 February 2011
  • 24. Potential Testing Tools • Frank and UISpec hmmm... • Sikuli • FoneMonkey • Brominet or iCuke • UIAutomation Friday, 18 February 2011
  • 26. UISpec - (void)itShouldHaveDefaultUsers; { [[app.tableView.label text:@"User"] should].exist; } Friday, 18 February 2011
  • 30. Cucumber Scenario: [name of the scenario] Friday, 18 February 2011
  • 31. Cucumber Scenario: [name of the scenario] Given [some statement] Friday, 18 February 2011
  • 32. Cucumber Scenario: [name of the scenario] Given [some statement] When [some action] Friday, 18 February 2011
  • 33. Cucumber Scenario: [name of the scenario] Given [some statement] When [some action] Then [some expected result] Friday, 18 February 2011
  • 34. Cucumber Scenario: [name of the scenario] Given [some statement] When [some action] Then [some expected result] And [another expectation] Friday, 18 February 2011
  • 35. to be perfectly Frank... Friday, 18 February 2011
  • 36. Tests iPhone App Friday, 18 February 2011
  • 37. Tests UISpec Cucumber / Ruby ? iPhone App Friday, 18 February 2011
  • 38. Tests Frank Server UISpec Cucumber / Ruby iPhone App Friday, 18 February 2011
  • 39. Tests Frank Driver Frank Server UISpec Cucumber / Ruby iPhone App Friday, 18 February 2011
  • 40. Tests Frank Driver Frank Server “frankly” UISpec Cucumber / Ruby iPhone App Friday, 18 February 2011
  • 41. Frank uses accessibility labels Friday, 18 February 2011
  • 42. frankly.my_dear do |i| dont_give_a_damn! end Friday, 18 February 2011
  • 43. frankly.my_dear do |i| dont_give_a_damn! end UISpec UIQuery Frank Frankly Friday, 18 February 2011
  • 44. frankly.my_dear do |i| dont_give_a_damn! end UISpec UIQuery [app.tableView.label text:@"User"]; Frank Frankly Friday, 18 February 2011
  • 45. frankly.my_dear do |i| dont_give_a_damn! end UISpec UIQuery [app.tableView.label text:@"User"]; Frank Frankly app tableView label text:’User’ Friday, 18 February 2011
  • 47. Frank Steps Scenario: default users should be present at startup When I start the app Then I should see “Users” Friday, 18 February 2011
  • 48. Frank Steps Scenario: default users should be present at startup When I start the app Then I should see “Users” Then /^I should see "([^"]*)"$/ do |expected_mark| check_element_exists("view marked:'#{expected_mark}'") end Friday, 18 February 2011
  • 50. The Road Ahead Friday, 18 February 2011
  • 51. Stewart Gleadow sgleadow@thoughtworks.com @stewgleadow Friday, 18 February 2011
  • 52. References • github.com/moredip/frank & http://groups.google.com/group/frank-discuss • code.google.com/p/uispec & http://groups.google.com/group/uispec • softnoise.wordpress.com/2010/11/14/ios-setting-up-a-test-environment/ • cukes.info • cuke4ninja.com • The RSpec Book Friday, 18 February 2011
  • 53. Images • http://www.myfreewallpapers.net/movies/pages/ frankenstein-02.shtml • http://www.workbloom.net/wp-content/uploads/2009/09/ road-ahead.jpg • http://upload.wikimedia.org/wikipedia/commons/archive/ 0/07/20090605224904!IMac_aluminium.png • http://themachoresponse.blogspot.com/2010/03/frankly-my- dear-i-dont-give-damn.html Friday, 18 February 2011