Cross-Platform Testing - Mobile Test Summit SF

Fe6b81005d1553accd6b2a28f6a2bef1?s=47 Pete Hodgson
November 01, 2012

Cross-Platform Testing - Mobile Test Summit SF

4 talks in one!

I talked briefly about Frank.

I talked a lot about how to use the Page Object pattern to enable re-usable, cross-platform tests.

Then I introduced PublicAutomation, a lightweight wrapper around Apple's private UIAutomation framework.

Finally I announced that lesspainful.com will be providing cloud hosting and support for Frank test suites.

Fe6b81005d1553accd6b2a28f6a2bef1?s=128

Pete Hodgson

November 01, 2012
Tweet

Transcript

  1. Thursday, November 1, 12

  2. Hi, I’m Pete Hodgson Thursday, November 1, 12

  3. Thursday, November 1, 12

  4. We’re Hiring Thursday, November 1, 12

  5. Thursday, November 1, 12

  6. two-minute tour of Frank Thursday, November 1, 12

  7. two-minute tour of Frank UI automation tool for native iOS

    apps - “WebDriver for iOS” Write your tests using the language and tooling you want integrate with CI powerful view-selection facilities explore a running app with symbiote Thursday, November 1, 12
  8. symbiote Thursday, November 1, 12

  9. lots more to tell you, but not right now Thursday,

    November 1, 12
  10. or come talk to me to find out more about

    Frank testingwithfrank.com Thursday, November 1, 12
  11. Cross-platform testing for mobile Thursday, November 1, 12

  12. Phone Thursday, November 1, 12

  13. Test Scripts Phone Thursday, November 1, 12

  14. Test Scripts Phone Automation Driver Thursday, November 1, 12

  15. Test Scripts Phone Automation Driver ... ... type_into_text_field( ‘username’, user

    ) type_into_text_field( ‘password’, pass ) touch “button marked:‘Login’” wait_for_element_to_exist( “loginBanner marked:‘Welcome #{user}’” ) ... ... Thursday, November 1, 12
  16. Test Scripts Phone Automation Driver ... ... type_into_text_field( ‘username’, user

    ) type_into_text_field( ‘password’, pass ) touch “button marked:‘Login’” wait_for_element_to_exist( “loginBanner marked:‘Welcome #{user}’” ) ... ... Hard to Read! Thursday, November 1, 12
  17. Test Scripts Phone Automation Driver ... ... type_into_text_field( ‘username’, user

    ) type_into_text_field( ‘password’, pass ) touch “button marked:‘Login’” wait_for_element_to_exist( “loginBanner marked:‘Welcome #{user}’” ) ... ... Fragile! Thursday, November 1, 12
  18. Test Scripts Phone Automation Driver ... ... type_into_text_field( ‘username’, user

    ) type_into_text_field( ‘password’, pass ) touch “button marked:‘Login’” wait_for_element_to_exist( “loginBanner marked:‘Welcome #{user}’” ) ... ... No Abstractions Thursday, November 1, 12
  19. Test Scripts Phone Automation Driver Thursday, November 1, 12

  20. the Page Object Pattern Thursday, November 1, 12

  21. Test Scripts Phone Automation Driver Thursday, November 1, 12

  22. Test Scripts Phone Automation Driver Page Objects Thursday, November 1,

    12
  23. Test Scripts Phone Automation Driver Page Objects Thursday, November 1,

    12
  24. Test Scripts Phone Automation Driver Page Objects class HomeScreen def

    login(user,pass) type_into_text_field( ‘username’, user ) type_into_text_field( ‘password’, pass ) touch “button marked:‘Login’” end def verify_logged_in_as(user) wait_for_element_to_exist( “loginBanner marked:‘Welcome #{user}’” ) end end Thursday, November 1, 12
  25. Test Scripts Phone Automation Driver Page Objects ... ... home_screen.login(

    ‘pete’, ‘sekrit’ ) home_screen.verify_logged_in_as( ‘pete’ ) ... ... Thursday, November 1, 12
  26. Phone Automation Driver Page Objects User Tech Test Scripts Thursday,

    November 1, 12
  27. Cross-platform testing for mobile Thursday, November 1, 12

  28. Cross-platform testing for mobile Thursday, November 1, 12

  29. Cross-platform testing for mobile Thursday, November 1, 12

  30. Phone Automation Driver Page Objects Test Scripts Thursday, November 1,

    12
  31. Phone Automation Driver Page Objects Test Scripts Thursday, November 1,

    12
  32. iPhone-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  33. iPhone-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  34. iPhone-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  35. iPhone-specific ‘stuff’ Web-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  36. iPhone-specific ‘stuff’ Web-specific ‘stuff’ Test Scripts class HomeScreen def login(user,pass)

    # WEBDRIVER STUFF GOES HERE end def verify_logged_in_as(user) # MORE WEBDRIVER STUFF end end Thursday, November 1, 12
  37. iPhone-specific ‘stuff’ Web-specific ‘stuff’ Test Scripts class HomeScreen def login(user,pass)

    # WEBDRIVER STUFF GOES HERE end def verify_logged_in_as(user) # MORE WEBDRIVER STUFF end end same interface Thursday, November 1, 12
  38. iPhone-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  39. iPhone-specific ‘stuff’ iPad-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  40. iPhone-specific ‘stuff’ iPad-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  41. iPhone-specific ‘stuff’ iPad-specific ‘stuff’ Test Scripts Thursday, November 1, 12

  42. User Tech Thursday, November 1, 12

  43. User Platform Thursday, November 1, 12

  44. Thursday, November 1, 12

  45. UIAutomation Apple’s Thursday, November 1, 12

  46. PublicAutomation Thursday, November 1, 12

  47. Bwoken Zucchini tuneup.js UISpec NativeDriver KIF Calabash Frank alternatives to

    stock UIAutomation Thursday, November 1, 12
  48. extend UIAutomation Bwoken Zucchini tuneup.js UISpec NativeDriver KIF Calabash Frank

    Thursday, November 1, 12
  49. replace UIAutomation Bwoken Zucchini tuneup.js UISpec NativeDriver KIF Calabash Frank

    Thursday, November 1, 12
  50. a third way: PublicAutomation Thursday, November 1, 12

  51. exposes Apple’s own low-level UIAutomation private framework PublicAutomation Thursday, November

    1, 12
  52. provides the power of Apple’s touch synthesis implementation PublicAutomation Thursday,

    November 1, 12
  53. gives the freedom to build better integration and tooling on

    top PublicAutomation Thursday, November 1, 12
  54. has been Frank’s touch synthesis library since 1.0 (replacing KIF)

    PublicAutomation Thursday, November 1, 12
  55. open source and up on github bit.ly/publicautomation PublicAutomation Thursday, November

    1, 12
  56. Thanks! Thursday, November 1, 12

  57. Thanks! Pete Hodgson @ph1 blog.thepete.net phodgson@thoughtworks.com Thursday, November 1, 12

  58. Thursday, November 1, 12

  59. one more thing... Thursday, November 1, 12

  60. Thursday, November 1, 12