Automated interactive testing for i os

1,090 views

Published on

Mobile March 2012

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,090
On SlideShare
0
From Embeds
0
Number of Embeds
318
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Automated interactive testing for i os

  1. 1. Automated Interactive Testing for iOS Rob Bajorek - Code 42 Software rob@code42.com
  2. 2. Topics• Interactive testing• The tools• Demo and walkthrough
  3. 3. Interactive Testing
  4. 4. Unit tests - (void)testClearNonPersistentCredentialsDoesNotClearPrivatePasswordPersistent { [self helper_setTestCredentialsPersistent:YES]; [self helper_setUpAccountTypePrivatePasswordPersistent:YES]; CPConfigService *cs = [[CPConfigService alloc] init]; [cs clearNonPersistentCredentials]; GHAssertEqualStrings(cs.dataPassword, testDataPassword, @"private password incorrectly cleared (%@)", cs.dataPassword);}- (void)testClearNonPersistentCredentialsClearsPrivatePasswordNonPersistent { [self helper_setTestCredentialsPersistent:YES]; [self helper_setUpAccountTypePrivatePasswordPersistent:NO]; CPConfigService *cs = [[CPConfigService alloc] init]; [cs clearNonPersistentCredentials]; GHAssertNil(cs.dataPassword, @"private password not cleared (%@)", cs.dataPassword);}
  5. 5. Unit tests can pay forthemselves over time
  6. 6. Unit tests are easy to automate
  7. 7. Continuous Integration
  8. 8. What’s missing?
  9. 9. Interactive testing is...• time-consuming• boring• error-prone
  10. 10. Automate yourinteractive testing
  11. 11. You still need people
  12. 12. The Tools• UI Automation• CoffeeScript• Accessibility• Zucchini
  13. 13. UI Automation• UI Automation Reference Collection
  14. 14. CoffeeScript• http://coffeescript.org
  15. 15. Accessibility• Accessibility Programming Guide for iOS
  16. 16. Zucchini• http://www.zucchiniframework.org
  17. 17. Natural language scriptThen on the "Browse" screen: Download file "Minneapolis.jpg" Tap cell "Minneapolis.jpg" in the tableThen on the "Viewer" screen: Verify navigation bar title is "Minneapolis.jpg" Tap "Back"Then on the "Browse" screen: Tap "Home"Then on the "Home" screen: Tap "Sign Out"
  18. 18. Demo• Brief install advice• Project setup• Example “smoke test”• Walkthrough
  19. 19. Prerequisites• See instructions at www.zucchiniframework.org• Homebrew / MacPorts• ImageMagick• CoffeeScript
  20. 20. Installing Zucchini• https://github.com/playup/zucchini• https://github.com/rajbeniwal/zucchini-demo
  21. 21. Demo and Walkthrough
  22. 22. Conclusion• Start at www.zucchiniframework.org• Use the UI Automation Reference for help• Get to know UIAElement• ‘Show all elements’: -> view.logElementTree()
  23. 23. Thank you!

×