• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Understanding Web Applications and Web Testing Tools - QAConf
 

Understanding Web Applications and Web Testing Tools - QAConf

on

  • 976 views

This presentation talks about various approaches taken by web automation tools, and pros and cons of the approach.

This presentation talks about various approaches taken by web automation tools, and pros and cons of the approach.

Statistics

Views

Total Views
976
Views on SlideShare
966
Embed Views
10

Actions

Likes
0
Downloads
20
Comments
0

2 Embeds 10

http://www.linkedin.com 6
https://www.linkedin.com 4

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Understanding Web Applications and Web Testing Tools - QAConf Understanding Web Applications and Web Testing Tools - QAConf Presentation Transcript

    • Understanding web applications
      to evaluate web testing tools
      - Narayan Raman
    • Web Application
      HTTP Request
      Web Server
      Browser
      HTTP
      Response
      (HTML, Javascript)
    • We test what is on the browser
      The browser always gets HTML, javascript
      We don't need to worry about the server technology!
      Server or Browser?
    • Locating elements
      Document Object Model
      XPath
      Simulating events
      From within the browser
      From outside the browser
      Test building blocks
    • HTML Pages -> represented in Javascript as a live window.documentobject
      Anything can be accessed through DOM
      document.getElementsById("id")
      document.forms[2].elements["login"]
      document.images[23].src
      document.links[5].href
      DOM: Document Object Model
    • XPaths are used to access structured XML data
      <person>
      <name>Ram</name>
      </person>
      //person[0]/name
      XPaths
    • HTML is not data, it is presentation + data
      <div>
      <span class="labels">Name: </span>
      <span>Ram</span>
      </div>
      /html/body/div/span[2]
      Semantic information now has to be ADDED to html
      id
      cssclass (more for presentation)
      Not the best solution
      XPaths (contd)
    • Window1
      Frame1
      Frame2
      IFrame1
      XPath does not traverse Frames and Iframes.
      User has to identify the containing Frame or Iframe before using Xpath
      Xpath is not consistent across browsers
      Xpath is slow
      More problems:
    • DOM properties and methods are browser dependent
      Need good wrapper functions
      To access DOM, need to go inside the browser
      Browser plugins
      Proxy based approach
      But, if accessible, DOM is more powerful than XPath
      DOM
    • Can monitor page load state and AJAX state
      No need for waits
      Can create elegant functions in javascript to normalize browser differences
      //table[@id='listing']/tbody/tr[4]/td[4]/input
      Vs
      _textbox("q", _near(_cell("Python Cookbook")))
      DOM Advantages
    • Outside
      Will be “real” simulation of events (OS level)
      May need browser in focus
      The correct way, if easily possible
      Write drivers for every browser type
      Maintenance problem
      Browser quirks
      Inside
      Proxy based approach
      Easy, but events are simulated at browser level
      Browser events allow parallel execution
      Browser extensions
      Maintenance
      Inside or Outside the browser?
    • Tests should run on any browser
      Steps should wait automatically for page load, AJAX
      Element identification should be stable
      Record/identify elements automatically on any browser
      Reduce playback time by running in parallel
      Handle complex UIs without the necessity to add ids
      Be simple to learn, scale and maintain
      What we should look for in Tools
    • Use a proxy
      Inject smart javascript
      Can handle any browser
      Can wait for page load/AJAX
      Can record on any browser
      Simulate events inside the browser
      Allows parallel playback
      Easy to maintain – small code base
      Minimal dependency on browser/OS architectures
      Simplest possible approach
    • Object identification and event simulation are nearly solved problems
      Tests should reflect intent rather than implementation of UI.
      Login as “testuser” with password “secret”
      Vs
      _click(_button("Logout"));
      _setValue(_textbox("user"), "test");
      _setValue(_password("password"), "secret");
      _click(_submit("Login"));
      Going beyond
    • V Narayan Raman
      narayan@tytosoftware.com
      http://sahi.co.in/
      Q&A