webmate: a tool for testing web 2.0 applications

31
WebMate: A Tool for Testing Web 2.0 Applications

Upload: anwarrchaudary

Post on 23-Jan-2018

34 views

Category:

Education


0 download

TRANSCRIPT

Page 1: WebMate: A Tool for Testing Web 2.0 Applications

WebMate: A Tool for Testing Web 2.0 Applications

Page 2: WebMate: A Tool for Testing Web 2.0 Applications

OutLine

• Introduction

• Problem Statement

• Key Points

• WebMate Framework

• Challenges (Academic Vs Industrial)

• Advantages

• References

Page 3: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 4: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 5: WebMate: A Tool for Testing Web 2.0 Applications

Key Points

• Understanding DOM

• Selenium Framework

Page 6: WebMate: A Tool for Testing Web 2.0 Applications

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

Page 7: WebMate: A Tool for Testing Web 2.0 Applications

example

<html><head><title>Example</title></head><body><h1>Example Page</h1><p>This is an example page.</p></body></html>

Page 8: WebMate: A Tool for Testing Web 2.0 Applications

DOM

Page 9: WebMate: A Tool for Testing Web 2.0 Applications

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

Page 10: WebMate: A Tool for Testing Web 2.0 Applications
Page 11: WebMate: A Tool for Testing Web 2.0 Applications

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

Page 12: WebMate: A Tool for Testing Web 2.0 Applications
Page 13: WebMate: A Tool for Testing Web 2.0 Applications
Page 14: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 15: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 16: WebMate: A Tool for Testing Web 2.0 Applications

Cont..

Functionalities

• Employs Selenium Framework to remote control browser.

• Trigger actions.

• Inspects current DOM states.

• Automatic analysis and reporting .

Page 17: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 18: WebMate: A Tool for Testing Web 2.0 Applications

Cont..(cont..)

Page 19: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 20: WebMate: A Tool for Testing Web 2.0 Applications
Page 21: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 22: WebMate: A Tool for Testing Web 2.0 Applications

Cont.. Replaying tests

Page 23: WebMate: A Tool for Testing Web 2.0 Applications

Cont..Sample Reported Output

Page 24: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 25: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 26: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 27: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 28: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 29: WebMate: A Tool for Testing Web 2.0 Applications

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.

Page 30: WebMate: A Tool for Testing Web 2.0 Applications

Advantages

• Provide better exploration than CrawlJax

• Uses existing Selenium framework.

• Maximize coverage and least states.

Page 31: WebMate: A Tool for Testing Web 2.0 Applications

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