KEMBAR78
Coded UI - Test automation Practices from the Field | PPTX
test automation practices from the field


CODED UI
Clemens Reijnen




www.clemensreijnen.nl
@clemensreijnen
clemens.reijnen@sogeti.nl
www.youtube.com/clemensreijnen
www.slideshare.net/clemensreijnen
the field


complex user interfaces
 big project structures
multiple environments
complex user interface
challenges:

           many controls
         changing controls
           complex flow
          multiple screens
         changing screens
                 …
complex user interface
practices:

            edit the UIMap
           search and filter
       reusable ’test’methods
       reusable test assertions
             shared steps
            loose coupling
          low dependencies
UIMap   multiple UIMap’s



          a map per
          - screen
             - scenario
             - part
             - team
             - …
multiple UIMap’s
UIMap   page object pattern
search   filter, search and the tree
reuse   UIMap Helper Class
reuse   test all controls
shared   reuse shared steps in Coded UI
UIMap mix      different test projects for




            tune your manual tests
            for automation or
            remove them
Object Repository:
        Keeps UI Object definitions
cuite

        separate from automation
        code (no more UIMaps)
complex user interface
take aways:

•   reuse steps and assertions
•   create helper classes
•   well defined uimap structure
•   use codeui builder
•   start from scratch or tune your manual tests
•   make clear test method names
•   separate the test intent from the test steps
•   no related tests
•   all test must leave the application in the same
    state
big project structures
challenges:

          multiple teams
    chain of distributed projects
              big teams
       short test timeframe
big project structures
practices:

         team collaboration
    branch strategy code and test
        versioning test case
           no double tests
collaborate

              work together
              __with work packages
              __on alm artifacts
branch
     test same heartbeat as development
branch
          tests




          tests            test           tests




                                          tests
          tests           tests
                                                          tests




          tests           tests                           tests
  build
                  build
                                  build
                                                  build
Visual Studio test projects
         with Coded UI test case
branch
UIMap per branch

     UIMap’s don’t merge well
branch
specific test
         automation branch
branch
! well maintained regression set
branch
MTM test plans
         with or without
         associated automation
branch
MTM test plans
         with or without
         associated automation
branch
                               test cases



                  test cases




                                             test cases
                                test cases                test cases
projects`
                                 Team
                                Project




             Team      Team       Team      Team      Team
            Project   Project    Project   Project   Project
double
double
big project structures
take a ways:

 branch structure /multiple team projects
              use areas well
        don’t make it too complex,
        some things can’t be done
test and developers have the same rhythm
multiple environments
challenges:

   test for different environments
     no virtualized environments
            short test cycles
        less time for execution
multiple environments
practices:

      execute with out SCVVM
    test execution responsibility
execute from build on environments
infra
infra
infra   configure for load or environments
execute
build
multiple environments
take a ways:

multiple environments is possible without
                 SCVVM
     how are the environments used
          who executes the tests
Test Automation Investment Levels

0 No investment in any kind of automation.
   Just click and test.
1 Clean up of the Action log maybe re-execute, for more
   smooth Fast Forward.
2 Basic Coded UI. Only use the default generation, add
   your own assertion.

3 Advanced Coded UI. Customize the Coded UI and
   UIMap for optimization.
Test Execution Investment Levels

4 Execute them on a single environment.

5 Execute them on multiple environments.

6 Execute them on virtualized environments.

7 …
final notes
interesting read / watch




http://www.ie.sogeti.com/Product--
                                     http://www.thoughtworks.com/ev
Services/Software-Testing--QA-
                                     ents/maintaining-automated-
Services/Test-Automation/
                                     acceptance-tests
soon available
43

Coded UI - Test automation Practices from the Field