SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
How to develop a successful Selenium
Automation Program


Dave Rader - CTO
Sreekanth Singaraju – VP of Testing Services




DATE: 6/28/2012
About Alliance
Alliance Global Services is a software development firm that partners with
software, technology and information-intensive businesses on their mission-
critical work.

We plan, design, architect, build, test and implement software applications,
platforms and products that become a primary driver of innovation and revenue
growth for our clients’ businesses.

We are recognized for driving quality and speed-to-market when business
success depends on the software inside.


      We operate agile development centers in the United States and
      Hyderabad, India and have over 650 employees

      We have partnered with more than 400 innovative clients in the
      Information Services, Software and Technology, Insurance and
      Healthcare industries


                                                                                2
Agenda

• Definition of success
• Impediments in Achieving Best in Class
  Automation
• Challenges & Solutions for Selenium Automation
• Key Takeaways
• Titanium xAFT Overview




                                                   3
Definition of Success for an Automation Program
                                                        Identifies defects of significance
                                            Effective   and adopted by Developers &
                                                        Testers
The framework should be of low
maintenance and should not take         Maintain
significant effort to handle routinue    able
changes to AUT
                                                        Automated test execution produces
                                             Robust     consistent and provable results.


  Can be leveraged on different          Re-
  releases, configurations &            Usable
  environments.
                                               Test     Ability to run Automated test scripts
                                            Independ
                                              ence                cases in any order.

  Delivers measurable value in
  terms of decreased cycles of
                                          ROI
  execution, decreased effort and
  improved quality

                                                                                             4
Impediments to Achieving Best in Class Automation

Objectives      Non-existent or Unrealistic automation objectives

                Focused around technical goals rather than business goals

Automation      Highest automation ROI areas not identified
Strategy
                Subscale initiatives or insufficient commitment

Start-Up        Tool licenses and framework creation costs
Costs
                Up front Labor cost for implementing test cases

Expertise &     Manual test teams lack development expertise
Assets
                Knowledge of test case lifecycle mgmt. missing

Measuring       Lack of a metrics program to measure alignment with overall objectives
Effectiveness
                Evaluate effectiveness of testing programs and fine-tune strategy




                                                                                         5
Challenges with Selenium Automation

Object        Ability to identify Objects and manage them to limit the expense
References    and effort to maintain updates to UI


Coding        Develop scripts in a consistent and maintainable format for
Standards     easy maintenance and effective execution


Reporting     Provide commercial quality reporting that enables testers to
              rapidly identify risks inherent in software and provide
              information to developers towards remediation

Framework     Implement a framework and process that will streamline
              management of common elements and resources in
              automation development

Expertise &   The ability to develop and maintain effectively automation and
Skillset      related assets to deliver ROI on automation investments




                                                                                 6
UI Object Reference
Most of the Commercial automation tools have the provision to create and manage UI objects
in a centralized repository. Selenium has limited tools to address this leading to high-
maintenance scripts

                                                       •   Object reference created using
                                                           XPATH, ID, Name, Class or CSS.
                                                           Common mistakes in constructing
                                                           Object references
                                                            •   Improper selection of Object
                                                                selection property type
                                                            •   Duplicate references to same objects
                                                            •   Full length XPATH from root used for
                                                                object identification
                                                       •   Leading to brittle references that
                                                           break when minor changes to UI are
                                                           implemented
                                                       •   Significant maintenance effort when
                                                           UI is redesigned


   //html/body/div/div/div[2]/ui/div/div[2]/div/h2/a

                                                                                                   7
UI Object Reference – Recommendations
                               •   Utilize common stored location
                                   for objects using logical names
                               •   Use Key-Value-Pair combination
                                   for Logical name and Object
                                   identification
                               •   Logical hierarchies to group
                                   objects for same features at the
                                   same place
                               •   Recommend UI developers use
                                   frameworks that provide unique
                                   identifiers for controls
                               •   Use the smart identification
                                   mechanism and use the
                                   optimized XPATH



  //div[@id=’icon-edit’/h2/a
                                                                      8
Coding Practices
Test engineers that perform script development on Selenium may not have formal
development training leading to common coding errors. These lead to expensive maintenance
when the scripts need to be updated or unexplained behavior for execution



                                                   • Not using a design pattern or
                                                     development strategies to
 selenium.type("name=j_username",                    develop framework and scripts
 "user1");
 selenium.type("name=j_password",
 "user123);                                        • No exception catching block in
 selenium.click("divdiv[1]spanlogin            the coding
 ");
 Thread.sleep(30000);
                                                   • Use of Objects reference such as
 selenium.click("class=Compose_Email");
                                                     path/xPATH in the code
                                                   • Use of hard coded values for the
                                                     data for inputs and validation




                                                                                            9
Coding Practices – Recommendations
                                             • Using a design pattern and
                                               development strategies like Page
                                               Object Model OR Domain Driven
                                               Design
try {
//Login to the system and Verify Email       • Utilize code style/quality checking
selenium.type(userNameLocator,
userNamevalue);                                tools to address:
selenium.type(passwordLocator,passwordvalu       • Exception handling
e);
selenium.click(loginLocator);
                                                 • Commenting
                                                 • Hard coding
selenium.isTextPresent(welcomeText);
} catch (Exception e) {                      • Use reusable coding practices for
Logger.Debug(("Element :["+ welcomeText+
"not found" +                                  handling input data, validations,
"continuing text execution"));                 object references and common
selenium.click("Compose_Email");               library functions
}
                                             • Utilize reference based object
                                               synchronization for script to
                                               synchronize with the app


                                                                                     10
Reporting & Metrics
Most of the Commercial automation tools provide extensive reporting functionality is not
available in Selenium and needs to be developed

                                                     • Poring over logs to identify
                                                       exceptions is time consuming
                                                       and error prone
                                                     • Execution metrics such as
                                                       coverage, script effectiveness etc
                                                       help fine-tune framework
                                                     • Test Execution meta data such
                                                       as environments, browsers,
                                                       pass/fail etc need to be extracted
                                                       from the basic logs
                                                     • Mapping of pass/fail data to
                                                       validation points needs to be
                                                       created
                                                     • Fatures such as screenshots are
                                                       completely missing
                                                                                           11
Reporting & Metrics
                      • Multiple levels of logging for
                        easy debugging and analysis
                      • Drill down Test Result
                        reports
                      • Automatic Emailing the Test
                        Result Reports
                      • Test Result Report
                        Integration with Test Case
                        Management Tools
                      • Screenshot capture on every
                        step or on exception
                      • Defect identification
                        effectiveness, designed
                        coverage and traceability to
                        features

                                                     12
Automation Framework
Poorly designed automation frameworks only transfer inefficiencies from scripts to the
framework while providing limited benefits


                                                 An example of a poorly designed
                                                 framework:
                                                 •   Poor architecture design limiting
           Automation                                flexibility of choosing target
        Framework: Target                            browsers, target environments
       Browsers, Test Data,                          and test data suites
        Object References,                       •   Lack of standards and guidelines
       Reusable Functions,                           for reusable functions,
       Exception Handling,                           components and object references
            Reporting                            •   Reporting features limited to logs
                                                     from Selenium
                                                 •   Weak governance leading to
                                                     diluted framework effectiveness

                                                                                          13
Automation Framework
                                                 •   Framework should be application-
                                                     independent.
                 Configuration                   •   Easy to expand, maintain, and
                     Files                           perpetuate as the underlying
                                                     application changes
                                                 •   Generic functionality like navigation,
  API Support                       Test Data
                                                     link checking, login/logout and
                                                     reports should be developed as
                  Application                        reusable functions
                Specific Business
                   Functions                     •   Business functionality will be
                                                     addressed in test scripts/suites
 Logging and                          Object     •   Test Data treated as a separate
  Reporting                         Repository       input into scripts
                                                 •   Implement support for Windows File
                    Generic                          and Authentication dialogs
                   Functions
                                                 •   Scripts should have minimal
                                                     external dependencies from:
                                                      – Browser versions
                                                      – Target environments

                                                                                          14
Expertise & Skillset
Currently there are a lot of good developers and good testers – but it is very hard to find good
automation Engineers that can develop effective automation


   Developers                                                     • Facilitate the creation of
                                                                    automation testers by
         Automation                                                 creating a cross
          Engineer                                                  functional/technical
                                                    Tester          training
                                                                  • Support them with
                                                                    robust automation
                                                                    frameworks and
                                                                    reusable assets
                                                                  • Ultimately Expensive to
                                                                    hire, maintain and retain
                                                                    resources



                                                                                                   15
Key Take Aways
Existing     Run scripts on more than one browser
Automation
Program      Run Sonar and identify code quality issues

             Metrics and reports from framework

             Validate scripts can run multiple data conditions with no code changes

             Change IDs for a few UI controls and evaluate impact on scripts

             Governance and process on managing framework


New          Review off-the-shelf automation frameworks first before building from
Automation   scratch
Program

                                                                                      16
Titanium xAFT Overview
xAFT is a Selenium based Automation tool to test web based applications from an
Excel worksheet using English like language.
                                                             allianceglobalservices.com/innovation


       Based on Open
         and proven                                                                  30% productivity
        technologies                                                                 improvements over
                                                                                     Selenium
                                                                                     automation

          Flexible &
        Maintainable
         framework                                                                     Execute scripts
                                                                                       from Excel


      Across browsers     Titanium xAFT (eXcel Automated Functional Tester) is a
      and web services    robust enterprise automation framework that enables
                          technical and non-technical users to manage and leverage
                          automation suites




   Web                    Mobile                            WebServices                            17
Thank You




            18

Mais conteúdo relacionado

Mais procurados

Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...manssandstrom
 
Blue Monitor Software Development
Blue Monitor Software DevelopmentBlue Monitor Software Development
Blue Monitor Software Developmenturbantech
 
Neil Tompson - SoftTest Ireland
Neil Tompson - SoftTest IrelandNeil Tompson - SoftTest Ireland
Neil Tompson - SoftTest IrelandDavid O'Dowd
 
Regression Testing
Regression TestingRegression Testing
Regression Testingchery209
 
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and SubversionBeyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and SubversionProduct Marketing Services
 
2012 student track - vs2010
2012   student track - vs20102012   student track - vs2010
2012 student track - vs2010Tim Mahy
 
Testing in the lifecycle
Testing in the lifecycleTesting in the lifecycle
Testing in the lifecycleHoang Nguyen
 
Shirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defectShirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defectAgileSparks
 
A software monitoring framework for quality verification
A software monitoring framework for quality verificationA software monitoring framework for quality verification
A software monitoring framework for quality verificationDileepa Jayathilake
 
EmployDEX Consulting Services
EmployDEX Consulting ServicesEmployDEX Consulting Services
EmployDEX Consulting Serviceskhandaa
 
Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4JAMK
 
SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)Ayman El-Hattab
 
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileBuilding Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileWee Witthawaskul
 
How to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsHow to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsSantanu Bhattacharya
 
Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012Imaginet
 

Mais procurados (20)

Eswaranand Attuluri CV
Eswaranand Attuluri CVEswaranand Attuluri CV
Eswaranand Attuluri CV
 
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
Att lyckas med integration av arbetet från flera scrum team - Christophe Acho...
 
Blue Monitor Software Development
Blue Monitor Software DevelopmentBlue Monitor Software Development
Blue Monitor Software Development
 
Neil Tompson - SoftTest Ireland
Neil Tompson - SoftTest IrelandNeil Tompson - SoftTest Ireland
Neil Tompson - SoftTest Ireland
 
Regression Testing
Regression TestingRegression Testing
Regression Testing
 
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and SubversionBeyond Scrum: Scaling Agile with Continuous Delivery and Subversion
Beyond Scrum: Scaling Agile with Continuous Delivery and Subversion
 
Objectif cloud
Objectif cloudObjectif cloud
Objectif cloud
 
2012 student track - vs2010
2012   student track - vs20102012   student track - vs2010
2012 student track - vs2010
 
Testing in the lifecycle
Testing in the lifecycleTesting in the lifecycle
Testing in the lifecycle
 
Shirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defectShirly Ronen - Documenting an agile defect
Shirly Ronen - Documenting an agile defect
 
A software monitoring framework for quality verification
A software monitoring framework for quality verificationA software monitoring framework for quality verification
A software monitoring framework for quality verification
 
EmployDEX Consulting Services
EmployDEX Consulting ServicesEmployDEX Consulting Services
EmployDEX Consulting Services
 
Alm 4 Azure
Alm 4 AzureAlm 4 Azure
Alm 4 Azure
 
KumarjitSharma_28011985
KumarjitSharma_28011985KumarjitSharma_28011985
KumarjitSharma_28011985
 
Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4Test designandmanagementfreenest1dot4
Test designandmanagementfreenest1dot4
 
SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)
 
Building Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed AgileBuilding Mobile (app) Masterpiece with Distributed Agile
Building Mobile (app) Masterpiece with Distributed Agile
 
How to bake in quality in agile scrum projects
How to bake in quality in agile scrum projectsHow to bake in quality in agile scrum projects
How to bake in quality in agile scrum projects
 
RTF - Prasad bhatt
RTF - Prasad bhattRTF - Prasad bhatt
RTF - Prasad bhatt
 
Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012Quality Coding: What’s New with Visual Studio 2012
Quality Coding: What’s New with Visual Studio 2012
 

Semelhante a Alliance Successful Selenium Automation

Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-toolBabuDevanandam
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementationBharathi Krishnamurthi
 
Презентация
ПрезентацияПрезентация
Презентацияguest22d71d
 
Leveraging HP Performance Center
Leveraging HP Performance CenterLeveraging HP Performance Center
Leveraging HP Performance CenterMartin Spier
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxDSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxMikalai Alimenkou
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамDSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамSQALab
 
Leveraging process models across the asset lifecycle t fiske arc
Leveraging process models across the asset lifecycle t fiske arcLeveraging process models across the asset lifecycle t fiske arc
Leveraging process models across the asset lifecycle t fiske arcARC Advisory Group
 
Pros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdfPros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdfkalichargn70th171
 
Shahnawaz Md Test Engineer
Shahnawaz Md Test EngineerShahnawaz Md Test Engineer
Shahnawaz Md Test EngineerShahnawaz Md
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5hemasubbu08
 
Lanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMLanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMDebora Di Piano
 
Anupam chaturvedi resume latest
Anupam chaturvedi resume  latestAnupam chaturvedi resume  latest
Anupam chaturvedi resume latestAnupam chaturvedi
 
TDD in functional testing with WebDriver
TDD in functional testing with WebDriverTDD in functional testing with WebDriver
TDD in functional testing with WebDriverMikalai Alimenkou
 
Sucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QASucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QASucheta Kale
 
Software Architecture Intro
Software Architecture IntroSoftware Architecture Intro
Software Architecture IntroSadhana Ghalsasi
 
Agile Testing at eBay
Agile Testing at eBayAgile Testing at eBay
Agile Testing at eBayDominik Dary
 
Project_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxProject_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxskhushi9980
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development IntroductionGanuka Yashantha
 

Semelhante a Alliance Successful Selenium Automation (20)

Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-tool
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementation
 
Презентация
ПрезентацияПрезентация
Презентация
 
Leveraging HP Performance Center
Leveraging HP Performance CenterLeveraging HP Performance Center
Leveraging HP Performance Center
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxDSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
 
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестамDSL, Page Object и WebDriver – путь к надежным функциональным тестам
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
 
Leveraging process models across the asset lifecycle t fiske arc
Leveraging process models across the asset lifecycle t fiske arcLeveraging process models across the asset lifecycle t fiske arc
Leveraging process models across the asset lifecycle t fiske arc
 
Pros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdfPros and Cons of key test automation frameworks.pdf
Pros and Cons of key test automation frameworks.pdf
 
Shahnawaz Md Test Engineer
Shahnawaz Md Test EngineerShahnawaz Md Test Engineer
Shahnawaz Md Test Engineer
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
Lanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALMLanzamiento Visual Studio 2012 - Modern ALM
Lanzamiento Visual Studio 2012 - Modern ALM
 
CADA english
CADA englishCADA english
CADA english
 
Anupam chaturvedi resume latest
Anupam chaturvedi resume  latestAnupam chaturvedi resume  latest
Anupam chaturvedi resume latest
 
TDD in functional testing with WebDriver
TDD in functional testing with WebDriverTDD in functional testing with WebDriver
TDD in functional testing with WebDriver
 
Sucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QASucheta_kale_4.8years_QA
Sucheta_kale_4.8years_QA
 
Software Architecture Intro
Software Architecture IntroSoftware Architecture Intro
Software Architecture Intro
 
Agile Testing at eBay
Agile Testing at eBayAgile Testing at eBay
Agile Testing at eBay
 
Project_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxProject_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptx
 
Karuna Resume
Karuna ResumeKaruna Resume
Karuna Resume
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
 

Alliance Successful Selenium Automation

  • 1. How to develop a successful Selenium Automation Program Dave Rader - CTO Sreekanth Singaraju – VP of Testing Services DATE: 6/28/2012
  • 2. About Alliance Alliance Global Services is a software development firm that partners with software, technology and information-intensive businesses on their mission- critical work. We plan, design, architect, build, test and implement software applications, platforms and products that become a primary driver of innovation and revenue growth for our clients’ businesses. We are recognized for driving quality and speed-to-market when business success depends on the software inside. We operate agile development centers in the United States and Hyderabad, India and have over 650 employees We have partnered with more than 400 innovative clients in the Information Services, Software and Technology, Insurance and Healthcare industries 2
  • 3. Agenda • Definition of success • Impediments in Achieving Best in Class Automation • Challenges & Solutions for Selenium Automation • Key Takeaways • Titanium xAFT Overview 3
  • 4. Definition of Success for an Automation Program Identifies defects of significance Effective and adopted by Developers & Testers The framework should be of low maintenance and should not take Maintain significant effort to handle routinue able changes to AUT Automated test execution produces Robust consistent and provable results. Can be leveraged on different Re- releases, configurations & Usable environments. Test Ability to run Automated test scripts Independ ence cases in any order. Delivers measurable value in terms of decreased cycles of ROI execution, decreased effort and improved quality 4
  • 5. Impediments to Achieving Best in Class Automation Objectives Non-existent or Unrealistic automation objectives Focused around technical goals rather than business goals Automation Highest automation ROI areas not identified Strategy Subscale initiatives or insufficient commitment Start-Up Tool licenses and framework creation costs Costs Up front Labor cost for implementing test cases Expertise & Manual test teams lack development expertise Assets Knowledge of test case lifecycle mgmt. missing Measuring Lack of a metrics program to measure alignment with overall objectives Effectiveness Evaluate effectiveness of testing programs and fine-tune strategy 5
  • 6. Challenges with Selenium Automation Object Ability to identify Objects and manage them to limit the expense References and effort to maintain updates to UI Coding Develop scripts in a consistent and maintainable format for Standards easy maintenance and effective execution Reporting Provide commercial quality reporting that enables testers to rapidly identify risks inherent in software and provide information to developers towards remediation Framework Implement a framework and process that will streamline management of common elements and resources in automation development Expertise & The ability to develop and maintain effectively automation and Skillset related assets to deliver ROI on automation investments 6
  • 7. UI Object Reference Most of the Commercial automation tools have the provision to create and manage UI objects in a centralized repository. Selenium has limited tools to address this leading to high- maintenance scripts • Object reference created using XPATH, ID, Name, Class or CSS. Common mistakes in constructing Object references • Improper selection of Object selection property type • Duplicate references to same objects • Full length XPATH from root used for object identification • Leading to brittle references that break when minor changes to UI are implemented • Significant maintenance effort when UI is redesigned //html/body/div/div/div[2]/ui/div/div[2]/div/h2/a 7
  • 8. UI Object Reference – Recommendations • Utilize common stored location for objects using logical names • Use Key-Value-Pair combination for Logical name and Object identification • Logical hierarchies to group objects for same features at the same place • Recommend UI developers use frameworks that provide unique identifiers for controls • Use the smart identification mechanism and use the optimized XPATH //div[@id=’icon-edit’/h2/a 8
  • 9. Coding Practices Test engineers that perform script development on Selenium may not have formal development training leading to common coding errors. These lead to expensive maintenance when the scripts need to be updated or unexplained behavior for execution • Not using a design pattern or development strategies to selenium.type("name=j_username", develop framework and scripts "user1"); selenium.type("name=j_password", "user123); • No exception catching block in selenium.click("divdiv[1]spanlogin the coding "); Thread.sleep(30000); • Use of Objects reference such as selenium.click("class=Compose_Email"); path/xPATH in the code • Use of hard coded values for the data for inputs and validation 9
  • 10. Coding Practices – Recommendations • Using a design pattern and development strategies like Page Object Model OR Domain Driven Design try { //Login to the system and Verify Email • Utilize code style/quality checking selenium.type(userNameLocator, userNamevalue); tools to address: selenium.type(passwordLocator,passwordvalu • Exception handling e); selenium.click(loginLocator); • Commenting • Hard coding selenium.isTextPresent(welcomeText); } catch (Exception e) { • Use reusable coding practices for Logger.Debug(("Element :["+ welcomeText+ "not found" + handling input data, validations, "continuing text execution")); object references and common selenium.click("Compose_Email"); library functions } • Utilize reference based object synchronization for script to synchronize with the app 10
  • 11. Reporting & Metrics Most of the Commercial automation tools provide extensive reporting functionality is not available in Selenium and needs to be developed • Poring over logs to identify exceptions is time consuming and error prone • Execution metrics such as coverage, script effectiveness etc help fine-tune framework • Test Execution meta data such as environments, browsers, pass/fail etc need to be extracted from the basic logs • Mapping of pass/fail data to validation points needs to be created • Fatures such as screenshots are completely missing 11
  • 12. Reporting & Metrics • Multiple levels of logging for easy debugging and analysis • Drill down Test Result reports • Automatic Emailing the Test Result Reports • Test Result Report Integration with Test Case Management Tools • Screenshot capture on every step or on exception • Defect identification effectiveness, designed coverage and traceability to features 12
  • 13. Automation Framework Poorly designed automation frameworks only transfer inefficiencies from scripts to the framework while providing limited benefits An example of a poorly designed framework: • Poor architecture design limiting Automation flexibility of choosing target Framework: Target browsers, target environments Browsers, Test Data, and test data suites Object References, • Lack of standards and guidelines Reusable Functions, for reusable functions, Exception Handling, components and object references Reporting • Reporting features limited to logs from Selenium • Weak governance leading to diluted framework effectiveness 13
  • 14. Automation Framework • Framework should be application- independent. Configuration • Easy to expand, maintain, and Files perpetuate as the underlying application changes • Generic functionality like navigation, API Support Test Data link checking, login/logout and reports should be developed as Application reusable functions Specific Business Functions • Business functionality will be addressed in test scripts/suites Logging and Object • Test Data treated as a separate Reporting Repository input into scripts • Implement support for Windows File Generic and Authentication dialogs Functions • Scripts should have minimal external dependencies from: – Browser versions – Target environments 14
  • 15. Expertise & Skillset Currently there are a lot of good developers and good testers – but it is very hard to find good automation Engineers that can develop effective automation Developers • Facilitate the creation of automation testers by Automation creating a cross Engineer functional/technical Tester training • Support them with robust automation frameworks and reusable assets • Ultimately Expensive to hire, maintain and retain resources 15
  • 16. Key Take Aways Existing Run scripts on more than one browser Automation Program Run Sonar and identify code quality issues Metrics and reports from framework Validate scripts can run multiple data conditions with no code changes Change IDs for a few UI controls and evaluate impact on scripts Governance and process on managing framework New Review off-the-shelf automation frameworks first before building from Automation scratch Program 16
  • 17. Titanium xAFT Overview xAFT is a Selenium based Automation tool to test web based applications from an Excel worksheet using English like language. allianceglobalservices.com/innovation Based on Open and proven 30% productivity technologies improvements over Selenium automation Flexible & Maintainable framework Execute scripts from Excel Across browsers Titanium xAFT (eXcel Automated Functional Tester) is a and web services robust enterprise automation framework that enables technical and non-technical users to manage and leverage automation suites Web Mobile WebServices 17
  • 18. Thank You 18