Your SlideShare is downloading. ×
Stepin evening presented
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Stepin evening presented


Published on

Published in: Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Succeeding in Web Automation A strategy & blueprint June 29, 2010 Kapil Bhalla Vijayan Reddy
  • 2. Understand the challenges Look at Pain Points Blue Print – Deep Dive Agenda Next 60 minutes…
  • 3. Present Scenario - Product Decade Old Product Interleaved with multiple technologies Focus on new development technologies and framework Increasing team size with newer people Flex Java Script HTML DOJO SOAP Web Services REST
  • 4. Present Scenario – Development Agile Development Shorter Release Cycles Long Testing Cycles…growing continuously with every release. No Automation Yet !! Need for Speed
  • 5. Present Scenario – Customer Expectation Should work on my current browser ! Should work on Operating System I use! No Compromise on Quality ! Even higher expectation from Customer Support Google Chrome Internet Explorer 7 Internet Explorer 8 Internet Explorer 6 FireFox 3 FireFox 3.7 Windows XP SP2 Windows XP SP3 Windows Vista Windows 7 Mac 10 / 10
  • 6. We are in agreement !
  • 7. What Can we Do ? Automate  We know That! Then What ??
  • 8. Agenda Pain Points
    • Pain Points in Automation
    • Agreement
  • 9. Pain Points in Automation Absence of Single “Silver Bullet” tool. Poor Ease of automating test cases. (The coding way) Learning Curve for new automation libraries, frameworks. Diversified domain / functional knowledge among team members. Enabling multiple contributors to automation projects. Expected Low maintenance in long run . Always expensive to switch to a different automation tool/framework.
  • 10. We are in agreement !
  • 11. Agenda Blue Print – Deep Dive
    • Overview
    • Onboarding
    • Architecture
    • What we achieved
  • 12. Blue Print– 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)
      • Automation Tool
    • Loose Test-Tool Coupling
  • 13. 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. public void setPassword(String pass) {…} setLoginName(String user) { … }
  • 14. 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.
  • 15. Blue Print 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.
  • 16. Blue Print On-boarding - WebDriver Web Driver : Page Objects indirectly interact with the set of Web Driver libraries 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 TeKila framework (Recommended way is TeKila APIs )
  • 17. TeKila Architecture
  • 18. Blue Print What we achieved
      • Ease of use - Its only Simple Java APIs
        • Low learning curve
      • Easy to extend
      • Reuse code and domain knowledge
      • Track execution flow
      • Flexible and Powerful
      • Straightforward integration with other tools/libraries (Html Unit, Selenium)
  • 19. Summary Blue Print is …
    • Separation of Concerns.
    • Aggregation of various Open Source tools 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)
  • 20. Discussion
  • 21. References Google WebDriver Project homepage Google Test Automation Conference (GTAC) 2007 Presentation on WebDriver Xpath basics
  • 22. 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
  • 23. Browser Drivers
  • 24. Decision Criteria – Web Driver Developer Productivity   Object/API discoverability Good: Using tools like FireBug, IE Developer, Or source code directly  (hit objects using Text, partial text, id - best way usually, xpath, etc...) Training/Consulting available Active Web Driver Community, Internal Users Ease of use Simple Java Programming concepts, Normal Web Elements awareness - Buttons, Anchor, Tables … Language knowledge in team Java.  Beginners 1 to 2 days are good to get going Vendor responsiveness Its GOOGLE Open Source Community - Google Web Driver. Issues get fixed and tracked.  Have 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. Incremental Cost One Time effort to build up Specific Infrastructure. (Tool Independent) Then equivalent to : 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
  • 25. Decision Criteria … Criteria Selenium WebDriver Watir Sahi Browser/ Platform Support All All Some (immature Safari support) All Development/Community Great Good Decent Small, not well known Infrequent releases Ease of use Requires server Concept of Page Object, simple API Ruby learning curve manual proxy, no frames + multiple domains Hacky multiple-domain support Language Support Many! Java Ruby, Java coming JavaScript Modal Dialogs Coming? Coming… Limited Limited