SlideShare ist ein Scribd-Unternehmen logo
1 von 60
Downloaden Sie, um offline zu lesen
Thursday, November 1, 12
Hi, I’m
                 Pete Hodgson

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

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


Thursday, November 1, 12
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
symbiote




Thursday, November 1, 12
lots more to
                   tell you, but
                  not right now

Thursday, November 1, 12
testingwithfrank.com
                      or come talk to me
                       to find out more
                         about Frank

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

Thursday, November 1, 12
Phone




Thursday, November 1, 12
Test Scripts
                            Phone




Thursday, November 1, 12
Test Scripts
                            Automation   Phone
                              Driver




Thursday, November 1, 12
Test Scripts
                                          Automation   Phone
                                            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
Test Scripts
                            Hard to
                            Read!         Automation
                                            Driver
                                                       Phone



                            ...
                            ...

                            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
!
             Test Scripts



                                 gi l e    Automation
                                             Driver
                                                        Phone



                            Fr a
                             ...
                             ...

                             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
N o        s
                                          on
             Test Scripts


                                t ra c ti    Automation   Phone

                              s
                                               Driver



                           Ab
                               ...
                               ...

                               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
Test Scripts
                            Automation   Phone
                              Driver




Thursday, November 1, 12
the
                           Page Object
                             Pattern

Thursday, November 1, 12
Test Scripts
                            Automation   Phone
                              Driver




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




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




Thursday, November 1, 12
Test Scripts
                           class HomeScreen
                                                  Page   Automation Phone
                                                            Driver
                             def login(user,pass)Objects
                               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
Test Scripts
                                   Page     Automation   Phone
                                  Objects     Driver




                            ...
                            ...

                            home_screen.login( ‘pete’, ‘sekrit’ )
                            home_screen.verify_logged_in_as( ‘pete’ )

                            ...
                            ...



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




                           User     Tech
Thursday, November 1, 12
Cross-platform
                           testing
                         for mobile

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

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

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




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




Thursday, November 1, 12
Test Scripts



                            iPhone-specific
                                ‘stuff’




Thursday, November 1, 12
Test Scripts



                            iPhone-specific
                                ‘stuff’




Thursday, November 1, 12
Test Scripts



                            iPhone-specific
                                ‘stuff’




Thursday, November 1, 12
Test Scripts

                            iPhone-specific
                                ‘stuff’
                            Web-specific
                              ‘stuff’




Thursday, November 1, 12
Test Scripts   class HomeScreen

                              def login(user,pass)
                                #iPhone-specific GOES HERE
                                  WEBDRIVER STUFF
                              end
                                     ‘stuff’
                              def verify_logged_in_as(user)
                                 Web-specific
                                # MORE WEBDRIVER STUFF
                              end   ‘stuff’

                            end




Thursday, November 1, 12
same
                           interface
             Test Scripts        class HomeScreen

                                   def login(user,pass)
                                     #iPhone-specific GOES HERE
                                       WEBDRIVER STUFF
                                   end
                                          ‘stuff’
                                   def verify_logged_in_as(user)
                                      Web-specific
                                     # MORE WEBDRIVER STUFF
                                   end   ‘stuff’

                                 end




Thursday, November 1, 12
Test Scripts



                            iPhone-specific
                                ‘stuff’




Thursday, November 1, 12
Test Scripts

                            iPhone-specific
                                ‘stuff’
                            iPad-specific
                               ‘stuff’




Thursday, November 1, 12
Test Scripts

                            iPhone-specific
                                ‘stuff’
                            iPad-specific
                               ‘stuff’




Thursday, November 1, 12
Test Scripts

                            iPhone-specific
                                ‘stuff’
                            iPad-specific
                               ‘stuff’




Thursday, November 1, 12
User   Tech
Thursday, November 1, 12
User   Platform
Thursday, November 1, 12
Thursday, November 1, 12
Apple’s
                           UIAutomation



Thursday, November 1, 12
PublicAutomation



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


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


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


Thursday, November 1, 12
a third way:
                     PublicAutomation


Thursday, November 1, 12
PublicAutomation
                exposes Apple’s own
              low-level UIAutomation
                 private framework



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



Thursday, November 1, 12
PublicAutomation
                gives the freedom to
               build better integration
                 and tooling on top



Thursday, November 1, 12
PublicAutomation
               has been Frank’s touch
               synthesis library since
                         1.0

                           (replacing KIF)


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




Thursday, November 1, 12
Thanks!



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




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

Weitere ähnliche Inhalte

Mehr von mobiletestsummit

Mehr von mobiletestsummit (6)

Setting Apple's UI Automation Free with Appium
Setting Apple's UI Automation Free with AppiumSetting Apple's UI Automation Free with Appium
Setting Apple's UI Automation Free with Appium
 
Sikuli for Mobile Testing
Sikuli for Mobile TestingSikuli for Mobile Testing
Sikuli for Mobile Testing
 
Automating Firefox OS
Automating Firefox OSAutomating Firefox OS
Automating Firefox OS
 
MOET: Mobile End-to-End Testing
MOET: Mobile End-to-End TestingMOET: Mobile End-to-End Testing
MOET: Mobile End-to-End Testing
 
iOS Automated Testing with Calabash: Tips and Tricks
iOS Automated Testing with Calabash: Tips and TricksiOS Automated Testing with Calabash: Tips and Tricks
iOS Automated Testing with Calabash: Tips and Tricks
 
Calabash-Driver Lightning Talk by Dominik Dary
Calabash-Driver Lightning Talk by Dominik DaryCalabash-Driver Lightning Talk by Dominik Dary
Calabash-Driver Lightning Talk by Dominik Dary
 

Cross-Platform Testing with Frank

  • 2. Hi, I’m Pete Hodgson Thursday, November 1, 12
  • 4. We’re Hiring 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
  • 9. lots more to tell you, but not right now Thursday, November 1, 12
  • 10. testingwithfrank.com or come talk to me to find out more about Frank Thursday, November 1, 12
  • 11. Cross-platform testing for mobile Thursday, November 1, 12
  • 13. Test Scripts Phone Thursday, November 1, 12
  • 14. Test Scripts Automation Phone Driver Thursday, November 1, 12
  • 15. Test Scripts Automation Phone 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 Hard to Read! Automation Driver Phone ... ... 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
  • 17. ! Test Scripts gi l e Automation Driver Phone Fr a ... ... 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
  • 18. N o s on Test Scripts t ra c ti Automation Phone s Driver Ab ... ... 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
  • 19. Test Scripts Automation Phone Driver Thursday, November 1, 12
  • 20. the Page Object Pattern Thursday, November 1, 12
  • 21. Test Scripts Automation Phone Driver Thursday, November 1, 12
  • 22. Test Scripts Page Automation Phone Objects Driver Thursday, November 1, 12
  • 23. Test Scripts Page Automation Phone Objects Driver Thursday, November 1, 12
  • 24. Test Scripts class HomeScreen Page Automation Phone Driver def login(user,pass)Objects 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 Page Automation Phone Objects Driver ... ... home_screen.login( ‘pete’, ‘sekrit’ ) home_screen.verify_logged_in_as( ‘pete’ ) ... ... Thursday, November 1, 12
  • 26. Test Scripts Page Automation Phone Objects Driver User Tech 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. Test Scripts Page Automation Phone Objects Driver Thursday, November 1, 12
  • 31. Test Scripts Page Automation Phone Objects Driver Thursday, November 1, 12
  • 32. Test Scripts iPhone-specific ‘stuff’ Thursday, November 1, 12
  • 33. Test Scripts iPhone-specific ‘stuff’ Thursday, November 1, 12
  • 34. Test Scripts iPhone-specific ‘stuff’ Thursday, November 1, 12
  • 35. Test Scripts iPhone-specific ‘stuff’ Web-specific ‘stuff’ Thursday, November 1, 12
  • 36. Test Scripts class HomeScreen def login(user,pass) #iPhone-specific GOES HERE WEBDRIVER STUFF end ‘stuff’ def verify_logged_in_as(user) Web-specific # MORE WEBDRIVER STUFF end ‘stuff’ end Thursday, November 1, 12
  • 37. same interface Test Scripts class HomeScreen def login(user,pass) #iPhone-specific GOES HERE WEBDRIVER STUFF end ‘stuff’ def verify_logged_in_as(user) Web-specific # MORE WEBDRIVER STUFF end ‘stuff’ end Thursday, November 1, 12
  • 38. Test Scripts iPhone-specific ‘stuff’ Thursday, November 1, 12
  • 39. Test Scripts iPhone-specific ‘stuff’ iPad-specific ‘stuff’ Thursday, November 1, 12
  • 40. Test Scripts iPhone-specific ‘stuff’ iPad-specific ‘stuff’ Thursday, November 1, 12
  • 41. Test Scripts iPhone-specific ‘stuff’ iPad-specific ‘stuff’ Thursday, November 1, 12
  • 42. User Tech Thursday, November 1, 12
  • 43. User Platform Thursday, November 1, 12
  • 45. Apple’s UIAutomation Thursday, November 1, 12
  • 47. alternatives to stock UIAutomation Bwoken UISpec Zucchini NativeDriver tuneup.js KIF Calabash Frank Thursday, November 1, 12
  • 48. extend UIAutomation Bwoken UISpec Zucchini NativeDriver tuneup.js KIF Calabash Frank Thursday, November 1, 12
  • 49. replace UIAutomation Bwoken UISpec Zucchini NativeDriver tuneup.js KIF Calabash Frank Thursday, November 1, 12
  • 50. a third way: PublicAutomation Thursday, November 1, 12
  • 51. PublicAutomation exposes Apple’s own low-level UIAutomation private framework Thursday, November 1, 12
  • 52. PublicAutomation provides the power of Apple’s touch synthesis implementation Thursday, November 1, 12
  • 53. PublicAutomation gives the freedom to build better integration and tooling on top Thursday, November 1, 12
  • 54. PublicAutomation has been Frank’s touch synthesis library since 1.0 (replacing KIF) Thursday, November 1, 12
  • 55. PublicAutomation open source and up on github bit.ly/publicautomation Thursday, November 1, 12
  • 57. Thanks! Pete Hodgson @ph1 blog.thepete.net phodgson@thoughtworks.com Thursday, November 1, 12
  • 59. one more thing... Thursday, November 1, 12