GTAC 2010 -

1,731 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,731
On SlideShare
0
From Embeds
0
Number of Embeds
396
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

GTAC 2010 -

  1. 1. Testing Dynamic Web Sites<br />V. Narayan Raman<br />Tyto Software<br />
  2. 2. Xpath does not query by text well<br /> <div>This is <b>Bold</b></div><br />//div[text()=‘This is Bold’] ?<br />_div(“This is Bold”)<br />Waits are needed at each step<br />Explicit waits: Have to code for worst case scenario<br />Implicit waits: Recover and retry<br />Tester is forced to understand HTML structures and Javascript nuances. <br />Common Problems <br />
  3. 3. Proxy based approach<br />Injects Javascript into browser<br />Any Javascript enabled browser, any OS<br />Drives a real browser<br />Identifies elements smartly<br />Implicitly waits for AJAX, page loads and timeouts<br />Sahi – Web Test Automation Tool<br />
  4. 4. //table[@id='listing']/tbody/tr[2]/td[4]/input<br />//table[@id='listing']/tbody/tr[3]/td[4]/input<br />Or <br />_textbox(“q”, _near(_cell("Core Java")))<br />_textbox(“q”, _near(_cell("Ruby for Rails")))<br />XPathvs Sahi APIs<br />
  5. 5. Visible properties take precedence<br />Tests should reflect what the tester sees<br />Not what the developer wrote<br />Frames, iframes, layouts are all developer aids to partition information. They need not be visible in tests, though they should be assertable.<br />Waits are inherent in a web application and should be automatically handled<br />Sahi Philosophy<br />
  6. 6. Use various visible attributes first<br />Text, Value, Alt, Title etc.<br />Allow identification in a context<br />_checkbox(“x”, _near(_cell(“name”)))<br />Allow Regular Expression and fuzzy matches<br />Normalize white spaces across browsers<br />Automatically look through frames and iframes.<br />Sahi Identification Strategy<br />
  7. 7. The simplest possible thing<br />What is not allowed by the Browser Sandbox, delegate to proxy<br />File Uploads<br />401 Authentication<br />File downloads<br />Browsers may change<br />Javascript and Proxies are here to stay<br />Proxy based approach<br />
  8. 8. Allows recording, debugging and object identification on any browser via injected Javascript<br />Can add automation on the fly<br />Even wrap flash/applets etc. when needed<br />Moving between domains, even accessing multi domains in frames/iframes are possible.<br />Proxy based approach<br />
  9. 9. Allows powerful Sahi APIs, normalized across browsers<br />Allows monitoring of AJAX requests and Frame loads to automatically wait till no activity<br />Javascript events do not require focus, allowing parallel playback<br />Injected Javascript<br />

×