SlideShare ist ein Scribd-Unternehmen logo
1 von 15
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

Weitere ähnliche Inhalte

Was ist angesagt?

Lecture 10 Answers
Lecture 10 AnswersLecture 10 Answers
Lecture 10 Answers
is4030.ray
 
Introduction to javaScript
Introduction to javaScriptIntroduction to javaScript
Introduction to javaScript
Neil Ghosh
 

Was ist angesagt? (20)

Suggest.js
Suggest.jsSuggest.js
Suggest.js
 
Ajax
AjaxAjax
Ajax
 
Selenium for-ops
Selenium for-opsSelenium for-ops
Selenium for-ops
 
Lecture 10 Answers
Lecture 10 AnswersLecture 10 Answers
Lecture 10 Answers
 
Dom structure
Dom structureDom structure
Dom structure
 
Java script
Java scriptJava script
Java script
 
Java Script
Java ScriptJava Script
Java Script
 
Java script
Java scriptJava script
Java script
 
Front-End Development
Front-End DevelopmentFront-End Development
Front-End Development
 
Introduction to Java Script
Introduction to Java ScriptIntroduction to Java Script
Introduction to Java Script
 
Java script
Java scriptJava script
Java script
 
C# cookieless session id and application state
C# cookieless session id and application stateC# cookieless session id and application state
C# cookieless session id and application state
 
Molly Holzschlag - How HTML 5 is Going to Completely Change your Web App
Molly Holzschlag - How HTML 5 is Going to Completely Change your Web AppMolly Holzschlag - How HTML 5 is Going to Completely Change your Web App
Molly Holzschlag - How HTML 5 is Going to Completely Change your Web App
 
Introduction to javaScript
Introduction to javaScriptIntroduction to javaScript
Introduction to javaScript
 
What's New for AJAX Developers in IE8 Beta1?
What's New for AJAX Developers in IE8 Beta1?What's New for AJAX Developers in IE8 Beta1?
What's New for AJAX Developers in IE8 Beta1?
 
J query
J queryJ query
J query
 
Html5 storage suggestions for challenges.pptx
Html5 storage   suggestions for challenges.pptxHtml5 storage   suggestions for challenges.pptx
Html5 storage suggestions for challenges.pptx
 
SPCA2013 - SharePoint Hosted Apps and Javascript
SPCA2013 - SharePoint Hosted Apps and JavascriptSPCA2013 - SharePoint Hosted Apps and Javascript
SPCA2013 - SharePoint Hosted Apps and Javascript
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
 
Java Script
Java ScriptJava Script
Java Script
 

Ähnlich wie Understanding Web Applications and Web Testing Tools - QAConf

Application Security
Application SecurityApplication Security
Application Security
nirola
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
Stoyan Stefanov
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 

Ähnlich wie Understanding Web Applications and Web Testing Tools - QAConf (20)

Architecture in Ajax Applications
Architecture in Ajax ApplicationsArchitecture in Ajax Applications
Architecture in Ajax Applications
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)
 
Building fast webapps, fast - Velocity 2010
Building fast webapps, fast - Velocity 2010Building fast webapps, fast - Velocity 2010
Building fast webapps, fast - Velocity 2010
 
php
phpphp
php
 
Why Browser Debugger is a Developer's Best Friend
Why Browser Debugger is a Developer's Best FriendWhy Browser Debugger is a Developer's Best Friend
Why Browser Debugger is a Developer's Best Friend
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
 
Application Security
Application SecurityApplication Security
Application Security
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
Building Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan DieboltBuilding Smart Workflows - Dan Diebolt
Building Smart Workflows - Dan Diebolt
 
MTaulty_DevWeek_Silverlight
MTaulty_DevWeek_SilverlightMTaulty_DevWeek_Silverlight
MTaulty_DevWeek_Silverlight
 
IE8 Dev Overview_pp2003
IE8 Dev Overview_pp2003IE8 Dev Overview_pp2003
IE8 Dev Overview_pp2003
 
Ajax to the Moon
Ajax to the MoonAjax to the Moon
Ajax to the Moon
 
WordCamp Denmark Keynote
WordCamp Denmark KeynoteWordCamp Denmark Keynote
WordCamp Denmark Keynote
 
前端概述
前端概述前端概述
前端概述
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 
Dom
DomDom
Dom
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Understanding Web Applications and Web Testing Tools - QAConf

  • 1. Understanding web applications to evaluate web testing tools - Narayan Raman
  • 2. Web Application HTTP Request Web Server Browser HTTP Response (HTML, Javascript)
  • 3. 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?
  • 4. Locating elements Document Object Model XPath Simulating events From within the browser From outside the browser Test building blocks
  • 5. 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
  • 6. XPaths are used to access structured XML data <person> <name>Ram</name> </person> //person[0]/name XPaths
  • 7. 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)
  • 8. 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:
  • 9. 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
  • 10. 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
  • 11. 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?
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. V Narayan Raman narayan@tytosoftware.com http://sahi.co.in/ Q&A