SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Web Test Automation Framework with Open
    Source Tools powered by Google WebDriver




Kapil Bhalla & Nikhil Bhandari
Intuit Inc. (Bangalore)
What we will be doing?
   Understand Present Scenario

   Look at Pain Points

   Framework

   Q&A Discuss
Agenda Understand Present Scenario
ü
        Present Scenario
    ü
          Product
    ü
          Development

    ü
          Customer

ü
    Agreement

ü
    What can we      Do ?
Present Scenario - Product
  Decade Old Product
                             Java                   HTML
                             Script

           Fle                 Interleaved with multiple
           x
                                      technologies
                      DOJO


  Focus on new development technologies and
  framework
                 Web
                 Services
                              Increasing team size with newer
                              people
                                  REST                     SOAP


                                             AJAX
Present Scenario – Development
                    Need for Speed
     Agile Development

                             Shorter Release Cycles


 Long Testing Cycles…growing continuously with every release.


                   No Automation Yet !!
Present Scenario – Customer Expectation

 FireFox 3.7
                                                 Internet Explorer 7

 Should work on my current browser !                                     FireFox 3

  Google Chrome
                                                                       Internet Explorer 8
                                            10 / 10
               Internet Explorer 6                             No Compromise on Quality !

                                     Windows XP SP3
                                                                         Windows XP SP2
    Reliability is a must for us!
                            Windows Vista        Should work on Operating System I use!

                                                  Windows 7

  Even higher expectation from Customer Support
We are in agreement !
What Can we Do ?

        Automate 
        We know That!


         Then What ??
Agenda Pain Points
ü
    Pain Points in Automation
ü
    Agreement
Pain Points
 Absence of Single “Silver Bullet” tool.

    Learning Curve for new automation libraries, frameworks.


                   Enabling multiple contributors to automation projects.

                                           Expected Low maintenance in long run .

                  Poor Ease of automating test cases. (The coding way)


 Diversified domain / functional knowledge among team members.


    Always expensive to switch to a different automation tool/framework.
We are in agreement !
Agenda Framework

 ü
     Overview
 ü
     Onboarding
 ü
     Architecture
 ü
     What did we achieve
Framework an Overview
Object Oriented way to test a Web Application

It is a mechanism to enable
    •
        Structured testing effort
    •
        Multiple team members to contribute in automation
    •
        Leverage work done by others

Separation of concerns
    •
        Test code
    •
        Web Page Objects (Page modeling code)
    •
        Suite Formations
Loose Test-Tool Coupling
On demand Test Launch
Framework On-boarding : Page
Object
A Page Object is Object representation of a Web Page in Java Programming World.
All elements seen on the web page can be interacted with using the respective methods in the page
object. Page object uses information in Web Element Repository to interact with an element.
Framework On-boarding : Web Element
Repository
Refers to XML based collection of meta information about elements seen on
the Web Page. Framework uses this information to identify the Web Element
and then interact with it.


<element key="SAVE_BUTTON" findBy="ID" id="save" tag="input" name="“ xPath=""/>


Here this button is identified by using the ID and the id is "save".
Framework On-boarding - Tests
Test Cases : Test cases are assertions/verifications made on compilation of
workflows using one or more real web pages. Interaction with the web pages is
done using Page Objects. Example- Hit the login page, assert that the page
loaded completely and it is login page indeed.




Test Suites : These are collection of 1 or more test cases.
Framework On-boarding -
Packaging
It is an attempt to enable multiple contributors to contribute to the automation
project aligned with the team structure. An product area based segregation
helps both in division of work/impact areas and gives liberty to the area owner
to experiment with different ways of automating his/her area.


Packages aligned with common functionality provided by framework, like
utilities, logging features, framework code, etc.. should be clearly demarcated.
Framework On-boarding …
Reporting : The users can write messages to logs using the APIs exposed by the
framework. These messages are displayed in the final reports generated by the TESTNG
report engine.


Browser : Browser is a place where most of the noticeable action happens.


Test Engine :Test Engine takes in test cases and test suites and execute them.
Framework On-boarding -
WebDriver indirectly interact with the set of Web Driver libraries
Web Driver : Page Objects
to hook on to the Web Elements and to interact with them.
Some typical scenarios are finding an element, sending text to element, clicking
a button, reading value of an element, and so on..


User can use the libraries directly or through the APIs provided by the
framework (Recommended way is Framework APIs )
Framework Architecture


         CONFIDENTIAL
Framework What did we achieve
  •
      Ease of use - Its only Simple Java APIs
  •
      Easy to extend
  •
      Reuse code and domain knowledge
  •
      Track execution flow.
  •
      Flexible and Powerful
  •
      Straightforward integration with other tools/libraries (Html Unit,
        Selenium)
Framework is …
aggregation of various Open Source Powers enabling us to do:

§
    UI testing on Multiple Browsers and Operating Systems

§
    Business Logic layer testing using APIs
§
    Profiling data (like page load time, first/last request, http timing, status, etc)
§
   Integration with continuous integration build system with different Test Suits
classes
§
    Integration Virtual Test Execution Lab and Test Case Management System.
Discussion
References
Google WebDriver Project homepage
http://code.google.com/p/webdriver/


Google Test Automation Conference (GTAC) 2007 Presentation on WebDriver
http://www.youtube.com/watch?v=tGu1ud7hk5I


Latest Revision of this presentation slides
http://docs.google.com/leaf?id=0B_NzEJt8br0aNzgzYjE5OWItMjJiZC00YjhmLWEyY2YtOWE0YmY4Z
Contact Info
Kapil Bhalla
bhalla.kapil.10@gmail.com
http://in.linkedin.com/pub/kapil-bhalla/7/a47/a21


Nikhil Bhandari
nikhil.bhandari@gmail.com
http://in.linkedin.com/in/nikhilbhandari
Why WebDriver?
 •
     Multi-platform support (Mac & Win)
 •
     Multi-browser support (IE, FF, Safari, Chrome)
 •
     Faster adoption of new technologies (Win7, new browsers, etc.)
 •
     Free. The test developers may have fewer hassles obtaining licenses
 •
     Tests are written in Java programming language
 •
     Connections to browsers are optimized for each browser (IE uses COM, FF uses
       a plug-in, Safari uses AppleScript). Selenium executes javascript inside the
       browser, which causes some testing complications and a risk of a "single
       source error“
 •
     API is object oriented and "cleaner" than Selenium
 •
     Manipulates browsers directly (instead of hacking JavaScript code into the site)
 •
     Selenium and WebDriver merging! - Best of both worlds
 •
     Eclipse IDE
Browser Drivers
Decision Criteria – Web Driver
Developer Productivity                
                                     Good: Using tools like FireBug, IE Developer, Or source code directly  (hit objects using Text,
Object/API discoverability
                                     partial text, id - best way usually, xpath, etc...)
Training/Consulting available        Active Web Driver Community, Internal Users
                                     Simple Java Programming concepts, Normal Web Elements awareness - Buttons, Anchor, Tables
Ease of use
                                     …
Language knowledge in team           Java.  Beginners 1 to 2 days are good to get going
                                     Its GOOGLE Open Source Community - Google Web Driver. Issues get fixed and tracked.  Have
Vendor responsiveness
                                     seen post replys from simon stewart WD creator.
Cross Browser/Platform testing        
IE 7/8                               YES Both
FF 3.0/3.5                           YES
Safari 4.0 Mac                       Should work
Tool/Language Features                
Program Control (loops, decisions,
etc.)                                ALL Available, you can do almost anything
Ability to handle popups
                                     Can handle pop ups that are certain, remaining need to be figured out.
                                     One Time effort to build up Specific Infrastructure. (Tool Independent) Then equivalent to :
Incremental Cost
                                     writing simple Java program.
License availability                 FREE (Open Source)
Other Tools Integration               
Selenium, TestNG, Java Robots,
Fitnesse                             YES, Any tool with which Java can be easily integrated
Decision Criteria …
      Criteria            Selenium          WebDriver           Watir               Sahi
                    All               All                  Some (immature    All
 Browser/                                                  Safari support)
 Platform Support

                    Great             Good                 Decent            Small, not well
 Development/Com                                                             known
                    Infrequent
 munity
                    releases

                    Requires server   Concept of Page      Ruby learning     manual proxy, no
                                      Object, simple API   curve             frames + multiple
                                                                             domains
 Ease of use        Hacky multiple-
                    domain support


                    Many!             Java                 Ruby, Java        JavaScript
 Language Support                                          coming

                    Coming?           Coming…              Limited           Limited
 Modal Dialogs

Contenu connexe

Plus de IndicThreads

Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs itIndicThreads
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsIndicThreads
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayIndicThreads
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices IndicThreads
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreadsIndicThreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreadsIndicThreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingIndicThreads
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreadsIndicThreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprisesIndicThreads
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIndicThreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present FutureIndicThreads
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams IndicThreads
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameIndicThreads
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceIndicThreads
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java CarputerIndicThreads
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache SparkIndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & DockerIndicThreads
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackIndicThreads
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack CloudsIndicThreads
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!IndicThreads
 

Plus de IndicThreads (20)

Http2 is here! And why the web needs it
Http2 is here! And why the web needs itHttp2 is here! And why the web needs it
Http2 is here! And why the web needs it
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive ApplicationsUnderstanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
 
Go Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang wayGo Programming Language - Learning The Go Lang way
Go Programming Language - Learning The Go Lang way
 
Building Resilient Microservices
Building Resilient Microservices Building Resilient Microservices
Building Resilient Microservices
 
App using golang indicthreads
App using golang  indicthreadsApp using golang  indicthreads
App using golang indicthreads
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreads
 
How to Think in RxJava Before Reacting
How to Think in RxJava Before ReactingHow to Think in RxJava Before Reacting
How to Think in RxJava Before Reacting
 
Iot secure connected devices indicthreads
Iot secure connected devices indicthreadsIot secure connected devices indicthreads
Iot secure connected devices indicthreads
 
Real world IoT for enterprises
Real world IoT for enterprisesReal world IoT for enterprises
Real world IoT for enterprises
 
IoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreadsIoT testing and quality assurance indicthreads
IoT testing and quality assurance indicthreads
 
Functional Programming Past Present Future
Functional Programming Past Present FutureFunctional Programming Past Present Future
Functional Programming Past Present Future
 
Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams Harnessing the Power of Java 8 Streams
Harnessing the Power of Java 8 Streams
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fameBuilding & scaling a live streaming mobile platform - Gr8 road to fame
Building & scaling a live streaming mobile platform - Gr8 road to fame
 
Internet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads ConferenceInternet of things architecture perspective - IndicThreads Conference
Internet of things architecture perspective - IndicThreads Conference
 
Cars and Computers: Building a Java Carputer
 Cars and Computers: Building a Java Carputer Cars and Computers: Building a Java Carputer
Cars and Computers: Building a Java Carputer
 
Scrap Your MapReduce - Apache Spark
 Scrap Your MapReduce - Apache Spark Scrap Your MapReduce - Apache Spark
Scrap Your MapReduce - Apache Spark
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
 
Speed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedbackSpeed up your build pipeline for faster feedback
Speed up your build pipeline for faster feedback
 
Unraveling OpenStack Clouds
 Unraveling OpenStack Clouds Unraveling OpenStack Clouds
Unraveling OpenStack Clouds
 
Digital Transformation of the Enterprise. What IT leaders need to know!
Digital Transformation of the Enterprise. What IT  leaders need to know!Digital Transformation of the Enterprise. What IT  leaders need to know!
Digital Transformation of the Enterprise. What IT leaders need to know!
 

Dernier

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Web Test Automation Framework with Open Source Tools powered by Google WebDriver

  • 1. Web Test Automation Framework with Open Source Tools powered by Google WebDriver Kapil Bhalla & Nikhil Bhandari Intuit Inc. (Bangalore)
  • 2. What we will be doing? Understand Present Scenario Look at Pain Points Framework Q&A Discuss
  • 3. Agenda Understand Present Scenario ü Present Scenario ü Product ü Development ü Customer ü Agreement ü What can we Do ?
  • 4. Present Scenario - Product Decade Old Product Java HTML Script Fle Interleaved with multiple x technologies DOJO Focus on new development technologies and framework Web Services Increasing team size with newer people REST SOAP AJAX
  • 5. Present Scenario – Development Need for Speed Agile Development Shorter Release Cycles Long Testing Cycles…growing continuously with every release. No Automation Yet !!
  • 6. Present Scenario – Customer Expectation FireFox 3.7 Internet Explorer 7 Should work on my current browser ! FireFox 3 Google Chrome Internet Explorer 8 10 / 10 Internet Explorer 6 No Compromise on Quality ! Windows XP SP3 Windows XP SP2 Reliability is a must for us! Windows Vista Should work on Operating System I use! Windows 7 Even higher expectation from Customer Support
  • 7. We are in agreement !
  • 8. What Can we Do ? Automate  We know That! Then What ??
  • 9. Agenda Pain Points ü Pain Points in Automation ü Agreement
  • 10. Pain Points Absence of Single “Silver Bullet” tool. Learning Curve for new automation libraries, frameworks. Enabling multiple contributors to automation projects. Expected Low maintenance in long run . Poor Ease of automating test cases. (The coding way) Diversified domain / functional knowledge among team members. Always expensive to switch to a different automation tool/framework.
  • 11. We are in agreement !
  • 12. Agenda Framework ü Overview ü Onboarding ü Architecture ü What did we achieve
  • 13. Framework an Overview Object Oriented way to test a Web Application It is a mechanism to enable • Structured testing effort • Multiple team members to contribute in automation • Leverage work done by others Separation of concerns • Test code • Web Page Objects (Page modeling code) • Suite Formations Loose Test-Tool Coupling On demand Test Launch
  • 14. Framework On-boarding : Page Object A Page Object is Object representation of a Web Page in Java Programming World. All elements seen on the web page can be interacted with using the respective methods in the page object. Page object uses information in Web Element Repository to interact with an element.
  • 15. Framework On-boarding : Web Element Repository Refers to XML based collection of meta information about elements seen on the Web Page. Framework uses this information to identify the Web Element and then interact with it. <element key="SAVE_BUTTON" findBy="ID" id="save" tag="input" name="“ xPath=""/> Here this button is identified by using the ID and the id is "save".
  • 16. Framework On-boarding - Tests Test Cases : Test cases are assertions/verifications made on compilation of workflows using one or more real web pages. Interaction with the web pages is done using Page Objects. Example- Hit the login page, assert that the page loaded completely and it is login page indeed. Test Suites : These are collection of 1 or more test cases.
  • 17. Framework On-boarding - Packaging It is an attempt to enable multiple contributors to contribute to the automation project aligned with the team structure. An product area based segregation helps both in division of work/impact areas and gives liberty to the area owner to experiment with different ways of automating his/her area. Packages aligned with common functionality provided by framework, like utilities, logging features, framework code, etc.. should be clearly demarcated.
  • 18. Framework On-boarding … Reporting : The users can write messages to logs using the APIs exposed by the framework. These messages are displayed in the final reports generated by the TESTNG report engine. Browser : Browser is a place where most of the noticeable action happens. Test Engine :Test Engine takes in test cases and test suites and execute them.
  • 19. Framework On-boarding - WebDriver indirectly interact with the set of Web Driver libraries Web Driver : Page Objects to hook on to the Web Elements and to interact with them. Some typical scenarios are finding an element, sending text to element, clicking a button, reading value of an element, and so on.. User can use the libraries directly or through the APIs provided by the framework (Recommended way is Framework APIs )
  • 20. Framework Architecture CONFIDENTIAL
  • 21. Framework What did we achieve • Ease of use - Its only Simple Java APIs • Easy to extend • Reuse code and domain knowledge • Track execution flow. • Flexible and Powerful • Straightforward integration with other tools/libraries (Html Unit, Selenium)
  • 22. Framework is … aggregation of various Open Source Powers enabling us to do: § UI testing on Multiple Browsers and Operating Systems § Business Logic layer testing using APIs § Profiling data (like page load time, first/last request, http timing, status, etc) § Integration with continuous integration build system with different Test Suits classes § Integration Virtual Test Execution Lab and Test Case Management System.
  • 24. References Google WebDriver Project homepage http://code.google.com/p/webdriver/ Google Test Automation Conference (GTAC) 2007 Presentation on WebDriver http://www.youtube.com/watch?v=tGu1ud7hk5I Latest Revision of this presentation slides http://docs.google.com/leaf?id=0B_NzEJt8br0aNzgzYjE5OWItMjJiZC00YjhmLWEyY2YtOWE0YmY4Z
  • 25. Contact Info Kapil Bhalla bhalla.kapil.10@gmail.com http://in.linkedin.com/pub/kapil-bhalla/7/a47/a21 Nikhil Bhandari nikhil.bhandari@gmail.com http://in.linkedin.com/in/nikhilbhandari
  • 26. Why WebDriver? • Multi-platform support (Mac & Win) • Multi-browser support (IE, FF, Safari, Chrome) • Faster adoption of new technologies (Win7, new browsers, etc.) • Free. The test developers may have fewer hassles obtaining licenses • Tests are written in Java programming language • Connections to browsers are optimized for each browser (IE uses COM, FF uses a plug-in, Safari uses AppleScript). Selenium executes javascript inside the browser, which causes some testing complications and a risk of a "single source error“ • API is object oriented and "cleaner" than Selenium • Manipulates browsers directly (instead of hacking JavaScript code into the site) • Selenium and WebDriver merging! - Best of both worlds • Eclipse IDE
  • 28. Decision Criteria – Web Driver Developer Productivity   Good: Using tools like FireBug, IE Developer, Or source code directly  (hit objects using Text, Object/API discoverability partial text, id - best way usually, xpath, etc...) Training/Consulting available Active Web Driver Community, Internal Users Simple Java Programming concepts, Normal Web Elements awareness - Buttons, Anchor, Tables Ease of use … Language knowledge in team Java.  Beginners 1 to 2 days are good to get going Its GOOGLE Open Source Community - Google Web Driver. Issues get fixed and tracked.  Have Vendor responsiveness seen post replys from simon stewart WD creator. Cross Browser/Platform testing   IE 7/8 YES Both FF 3.0/3.5 YES Safari 4.0 Mac Should work Tool/Language Features   Program Control (loops, decisions, etc.) ALL Available, you can do almost anything Ability to handle popups Can handle pop ups that are certain, remaining need to be figured out. One Time effort to build up Specific Infrastructure. (Tool Independent) Then equivalent to : Incremental Cost writing simple Java program. License availability FREE (Open Source) Other Tools Integration   Selenium, TestNG, Java Robots, Fitnesse YES, Any tool with which Java can be easily integrated
  • 29. Decision Criteria … Criteria Selenium WebDriver Watir Sahi All All Some (immature All Browser/ Safari support) Platform Support Great Good Decent Small, not well Development/Com known Infrequent munity releases Requires server Concept of Page Ruby learning manual proxy, no Object, simple API curve frames + multiple domains Ease of use Hacky multiple- domain support Many! Java Ruby, Java JavaScript Language Support coming Coming? Coming… Limited Limited Modal Dialogs