Test Automation   Taras Lytvyn

Framework

                                 © 2012GlobalLogic Inc.   1
Automation testing Frameworks overview


  In this case, framework (test automation framework)
  - a proper organization of tests in the process
  of automated testing in terms of architecture
  test scripts building.

   The automation framework is defined as a
   set of concrete “test objects”, and also
   ways of their relationships with additional
   functionality.




                                                        © 2012GlobalLogic Inc.   2
COMPARISON Tool




                  © 2012GlobalLogic Inc.   3
Tests without Framework   Tests with Framework




                                           © 2012GlobalLogic Inc.   4
Examples:   client – server STAX




                    © 2012GlobalLogic Inc.   5
keyword-driven approach
Examples:




                         © 2012GlobalLogic Inc.   6
Examples:
            Web oriented




                           © 2012GlobalLogic Inc.   7
WHY Frameworks?
• Test scripts code unification




• Convenient refactoring

• Easy to write new functionality (add new features),
  modification of existing features




                                                        © 2012GlobalLogic Inc.   8
• Easy connection of
  additional modules or libraries and their usage

• Implementation of new automation tool
  (e.g. introduction of new versions of current tool that
  requires code changes)




                                                     © 2012GlobalLogic Inc.   9
• Clarity and readability of code




• Cross functionality (e.g. cross-browser testing),
  adding testing support for running tests on additional
  devices (dependency feature)



                                                  © 2012GlobalLogic Inc.   10
Why Structured design of automation
              code ?
EASY for test execution
• Convenient tests launching (all tests, only separate
  set of tests, etc.)




• Separation and division tests on suites



                                                 © 2012GlobalLogic Inc.   11
Automation Framework for web:




                                © 2012GlobalLogic Inc.   12
Realization example:




                       © 2012GlobalLogic Inc.   13
Peasants in mind hierarchy




                             © 2012GlobalLogic Inc.   14
Page Object Architecture




                           © 2012GlobalLogic Inc.   15
© 2012GlobalLogic Inc.   16
Extension Points
• Page Loader Class
• Classes with additional functionality (JS’s, Sikuli
  methods, etc.)
• Logger
• …




                                                        © 2012GlobalLogic Inc.   17
• Automation Framework is indispensable part of
  Automation Testing implementation
• Gives us:
  –   mechanism to drive the application under test
  –   executing the tests in needed order, with preferences
  –   quick test fixing
  –   reporting results



                                                          © 2012GlobalLogic Inc.   18
< QUESTIONS ? >



                  © 2012GlobalLogic Inc.   19
Taras Lytvyn
automation QC in Global Logic inc.
email : taras.lytvyn@globallogic.com
web: http://testers.lviv.ua/automation_blog




                                              © 2012GlobalLogic Inc.   20

Framework for Web Automation Testing

  • 1.
    Test Automation Taras Lytvyn Framework © 2012GlobalLogic Inc. 1
  • 2.
    Automation testing Frameworksoverview In this case, framework (test automation framework) - a proper organization of tests in the process of automated testing in terms of architecture test scripts building. The automation framework is defined as a set of concrete “test objects”, and also ways of their relationships with additional functionality. © 2012GlobalLogic Inc. 2
  • 3.
    COMPARISON Tool © 2012GlobalLogic Inc. 3
  • 4.
    Tests without Framework Tests with Framework © 2012GlobalLogic Inc. 4
  • 5.
    Examples: client – server STAX © 2012GlobalLogic Inc. 5
  • 6.
    keyword-driven approach Examples: © 2012GlobalLogic Inc. 6
  • 7.
    Examples: Web oriented © 2012GlobalLogic Inc. 7
  • 8.
    WHY Frameworks? • Testscripts code unification • Convenient refactoring • Easy to write new functionality (add new features), modification of existing features © 2012GlobalLogic Inc. 8
  • 9.
    • Easy connectionof additional modules or libraries and their usage • Implementation of new automation tool (e.g. introduction of new versions of current tool that requires code changes) © 2012GlobalLogic Inc. 9
  • 10.
    • Clarity andreadability of code • Cross functionality (e.g. cross-browser testing), adding testing support for running tests on additional devices (dependency feature) © 2012GlobalLogic Inc. 10
  • 11.
    Why Structured designof automation code ? EASY for test execution • Convenient tests launching (all tests, only separate set of tests, etc.) • Separation and division tests on suites © 2012GlobalLogic Inc. 11
  • 12.
    Automation Framework forweb: © 2012GlobalLogic Inc. 12
  • 13.
    Realization example: © 2012GlobalLogic Inc. 13
  • 14.
    Peasants in mindhierarchy © 2012GlobalLogic Inc. 14
  • 15.
    Page Object Architecture © 2012GlobalLogic Inc. 15
  • 16.
  • 17.
    Extension Points • PageLoader Class • Classes with additional functionality (JS’s, Sikuli methods, etc.) • Logger • … © 2012GlobalLogic Inc. 17
  • 18.
    • Automation Frameworkis indispensable part of Automation Testing implementation • Gives us: – mechanism to drive the application under test – executing the tests in needed order, with preferences – quick test fixing – reporting results © 2012GlobalLogic Inc. 18
  • 19.
    < QUESTIONS ?> © 2012GlobalLogic Inc. 19
  • 20.
    Taras Lytvyn automation QCin Global Logic inc. email : taras.lytvyn@globallogic.com web: http://testers.lviv.ua/automation_blog © 2012GlobalLogic Inc. 20