Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Frank iOS Testing

8,630 views

Published on

A recent talk I gave on using Frank for automated functional testing with iOS development.

Published in: Technology, News & Politics
  • Be the first to comment

Frank iOS Testing

  1. 1. Testing iOS appswith Frank Stewart Gleadow @stewgleadow
  2. 2. why have tests?
  3. 3. why have tests?
  4. 4. Testing Approaches
  5. 5. “It seems tobe working”
  6. 6. “Nothing isobviously broken”
  7. 7. Testing iPhone Apps iPhone App
  8. 8. iPhone App Server
  9. 9. iPhone App Solved? Server
  10. 10. iPhone App ? Solved? Server
  11. 11. Does MVC help?
  12. 12. UIViewUIViewController Model Server
  13. 13. UIViewUIViewController Model Server
  14. 14. UIViewUIViewController Solved? Model Server
  15. 15. UIView ?UIViewController Solved? Model Server
  16. 16. UIViewController UIView
  17. 17. UIViewController UIView 50% of native code?
  18. 18. UIViewController UIView
  19. 19. AutomatedFunctional Testing
  20. 20. Potential Testing Tools hmmm...
  21. 21. Potential Testing Tools• Frank and UISpec hmmm...
  22. 22. Potential Testing Tools• Frank and UISpec hmmm...• Sikuli
  23. 23. Potential Testing Tools• Frank and UISpec hmmm...• Sikuli• FoneMonkey
  24. 24. Potential Testing Tools• Frank and UISpec hmmm...• Sikuli• FoneMonkey• iCuke
  25. 25. Potential Testing Tools• Frank and UISpec hmmm...• Sikuli• FoneMonkey• iCuke• UIAutomation
  26. 26. UISpec
  27. 27. UISpec- (void)itShouldHaveDefaultUsers;{ [[app.tableView.label text:@"User"] should].exist;}
  28. 28. UISpec
  29. 29. Cucumber
  30. 30. CucumberScenario: [name of the scenario] Given [some statement] When [some action] Then [some expected result] And [another expectation]
  31. 31. to be perfectly Frank...
  32. 32. Tests iPhone App
  33. 33. Tests UISpec Cucumber / Ruby ? iPhone App
  34. 34. Tests Frank Server UISpec Cucumber / Ruby iPhone App
  35. 35. Tests Frank Driver Frank Server UISpec Cucumber / Ruby iPhone App
  36. 36. Tests Frank Driver Frank Server “frankly” UISpec Cucumber / Ruby iPhone App
  37. 37. Frankusesaccessibilitylabels
  38. 38. frankly.my_dear do |i| dont_give_a_damn!end
  39. 39. frankly.my_dear do |i| dont_give_a_damn!end UISpec UIQuery Frank Frankly
  40. 40. frankly.my_dear do |i| dont_give_a_damn!end UISpec UIQuery [app.tableView.label text:@"User"]; Frank Frankly
  41. 41. frankly.my_dear do |i| dont_give_a_damn!end UISpec UIQuery [app.tableView.label text:@"User"]; Frank Frankly app tableView label text:’User’
  42. 42. Frank StepsScenario: default users should be present at startup When I start the app Then I should see “Users”
  43. 43. Frank StepsScenario: 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
  44. 44. Demo
  45. 45. The Road Ahead
  46. 46. The Road Ahead Behind
  47. 47. Stewart Gleadowsgleadow@thoughtworks.com @stewgleadow
  48. 48. 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
  49. 49. 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• http://www.jesseshunting.com/images/confused_sign_post.jpg

×