webmate: a tool for testing web 2.0 applications
TRANSCRIPT
WebMate: A Tool for Testing Web 2.0 Applications
OutLine
• Introduction
• Problem Statement
• Key Points
• WebMate Framework
• Challenges (Academic Vs Industrial)
• Advantages
• References
Introduction
• Software testing has became a separate specialization in IT industry.
• Many techniques have been proposed.
• WebMate (developed by Germans)is one of the flourishing tool for web app testing.
• Today web apps are enriched on web 2.0 due to JavaScript.
Problem Statement
• The problem occurs when web applications don’t grasp same functionalities across different browsers .
• TestCases were generated manually, by visually comparing the functionalities.
• Transferring an academic approach on WebMate into commercial/real world.
Key Points
• Understanding DOM
• Selenium Framework
Understanding DOM
• Document object model
• When a web page is loaded, the browser creates a Document Object Model of the page.
• The Document Object Model (DOM) is a programming interface for HTML and XML documents
example
<html><head><title>Example</title></head><body><h1>Example Page</h1><p>This is an example page.</p></body></html>
DOM
How Selenium works?
• the client; he tells the taxi driver where he wants to go and how to get there
• the taxi driver; he executes the client's requests; the taxi driver sends his own requests to the car
• the car; the car executes the taxi driver's requests
Cont…
• test engineer that writes the automation code; the automation code sends requests to the browser driver component
• the browser driver component; it executes the test engineer requests; it sends its own request to the browser
• the browser; it executes the browser driver requests
Previous Work Limitations
• More than one release cycle of web app causes problem in writing TestCases.
• When any element changed during extraction of states the whole test suite breaks.
• No proper refactoring tool.
• Such tests were analyzed manually by screen shots in oracle part of testing or ignored sometimes.
WebMate
• A tool for automatically generating TesCases.
• It automatically explores the functionalities of web applications.
• Detects differences across multiple browser as well as different release cycle of same application.
Cont..
Functionalities
• Employs Selenium Framework to remote control browser.
• Trigger actions.
• Inspects current DOM states.
• Automatic analysis and reporting .
Cont..(How WebMate works?)
• Enter URL as input
• WebMate analyzes web app and learns usage model.
• That Usage Model allows to run different analysis such as cross-browser compatibility checks.
• Results of analysis then can be reported back to the user.
Cont..(cont..)
Cont..(Usage Model)
• After extraction of DOM states by triggering actions WebMate generates usage model of user interaction.
• It is a graph where nodes correspond to states of the application, and a transition represents a single interaction with the application.
Cont..
• When WebMate learns the usage model there will be an oracle suit for compatibility analysis.
• This incorporate the automatic decision that either the given behavior correct or not and exactable or not.
• Reference browser was baseline.
• WebMate generates test and replay them in different browsers.
• Then highlights the differences.
Cont.. Replaying tests
Cont..Sample Reported Output
Challenges(Research approach Vs Industrial/Real World)
• In research prototype authors wanted tool to be implemented as expected easily.
• In real life there would be a market for consulting services in which assembling of pilot customers were compulsory.
Cont..
Identifying User Elements
• In research approach authors only implemented analysis for DOM, JQuery and prototype event handlers.
• While in Real life there is a huge amount of different programming techniques.
Cont..
Identifying Application States
• WebMate can explore the visible and active user interface elements rather than exploring other unnecessary application states.
• Industrially this factor was almost covered academically. Now WebMate can supports number of state abstractions.
Cont..
User input and authentication
• Initially WebMate has hard coded login procedure for Web sites in which combination of username/password was given to access the next page.
• In real life there were many input forms such as ZIP code entry etc, this was then again covered by Customization.
Cont..
Oracles
• If sequence of User Interaction results in different set of user interface elements, WebMate will report that.
• WebMate to be ready for real world latter allowed to handle HTTP errors, Elements positioning, browser crash report errors.
Cont..
Security
• There is a security threat for WebMate that it couldn’t be install on server that’s why used as appliance (intranet) in real life.
Advantages
• Provide better exploration than CrawlJax
• Uses existing Selenium framework.
• Maximize coverage and least states.
References
• V. Dallmeier, M. Burger, T. Orth, and A. Zeller, “Webmate: Generating test cases for web 2.0,” in Software Quality. Increasing Value in Software and Systems Development. Springer, Jan. 2013, pp. 55–69.
• https://www.smashingmagazine.com/2009/03/40-stand-alone-javascript-libraries-for-specific-purposes/
• https://www.quora.com/How-does-the-Selenium-WebDriver-work
• https://www.w3.org/TR/DOM-Level-2-Core/introduction.html