1 State-Based Testing of Ajax Web Applications A. Marchetto, P. Tonella and F. Ricca CMSC737 Spring 2008 Shashvat A Thakor.

Slides:



Advertisements
Similar presentations
1/7 ITApplications XML Module Session 8: Introduction to Programming with XML.
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Interception of User’s Characteristics on the Web Michal Barla PeWe FIIT STU BA.
6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
Architecture-driven Modeling and Analysis By David Garlan and Bradley Schmerl Presented by Charita Feldman.
Collaborative Picture Gallery Project Presentation Amos Hersch Aviad Barzilai Supervisor Maxim Gurevitch Lab Chief Eng. Ilana David.
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Testing Components in the Context of a System CMSC 737 Fall 2006 Sharath Srinivas.
What is adaptive web technology?  There is an increasingly large demand for software systems which are able to operate effectively in dynamic environments.
A closer look Dynamic Webpages Jessica Meyerson March 1, 2011.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Ryan Putz. Outline  What is Ajax?  Member Technologies  Methodology  When and When Not To Use  Who’s Using Ajax?  Code Examples.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Chris Pinski.  History  What is Ajax  Who uses Ajax  Underlying Technologies  SE Aspect  Common Problems  Conclusion.
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Introduction to AJAX AJAX Keywords: JavaScript and XML
JavaScript & jQuery the missing manual Chapter 11
CS 4720 RESTfulness and AJAX CS 4720 – Web & Mobile Systems.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
May 16 – 18, 2007 Copyright 2007, Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide Build Great Web Application 'Fast and Easy'
Ruth Betcher Ruth Christie
XForms: A case study Rajiv Shivane & Pavitar Singh.
Yahoo! User Interface (YUI) Library Natly Mekdara.
 2008 Pearson Education, Inc. All rights reserved Ajax-Enabled Rich Internet Applications.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
Writing various AJAX forms in Drupal 7 1. Overview of Form API 2. Ctools 2.1 Ctools features 3. Ajax 3.1 Ajax Forms in Drupal 4. Putting it all together.
AJAX Making Dynamic Web pages more Dynamic Jim Hendricks April 25th, 2006.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Presentation. Recap A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate. Taken advantage of Spring’s multi layer.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Agile Test-based Modeling 資工 聶順成. Outline  Introduction : Modeling meets Programming  Agile Modeling: Using Models in Agile Projects  Model-based.
AJAX Compiled from “AJAX Programming” [Sang Shin] (Asynchronous JavaScript and XML)
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
DynaRIA: a Tool for Ajax Web Application Comprehension Dipartimento di Informatica e Sistemistica University of Naples “Federico II”, Italy Domenico Amalfitano.
HR for XML WebService -- Week 2 System Design Phase Smartest Fish.
INNOV-7: Building a Richer UI for the Browser Chris Skeldon Senior Solution Consultant.
Comparing model-based and dynamic event-extraction based GUI testing techniques : An empirical study Gigon Bae, Gregg Rothermel, Doo-Hwan Bae The Journal.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Ajax VS Flex A comparison based on shopping cart implementation PoHsu Yeh py2157.
JavaScript Overview Developer Essentials How to Code Language Constructs The DOM concept- API, (use W3C model) Objects –properties Methods Events Applications;
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
The basics of knowing the difference CLIENT VS. SERVER.
JavaScript & Introduction to AJAX
SEESCOASEESCOA SEESCOA Meeting Activities of LUC 9 May 2003.
AJAX – Asynchronous JavaScript And XML By Kranthi Kiran Nuthi CIS 764 Kansas State University.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Introduction to AJAX MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/4/2016.
Overview Web Technologies Computing Science Thompson Rivers University.
NAVSEA Liaison Scott Huseth Faculty Advisor Dr. Jiang Guo Team Members Areg Abcarians David Ballardo Niteen Borge Daniel Flores Constance Jiang June 3,
1/7/2016www.infocampus.co.in1. 1/7/2016www.infocampus.co.in2 Web Development training gives you and all-round training in both the design and the development.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
Sponsored by Portakal Technologies
Working with Client-Side Scripting
AJAX.
Chapter 10: Process Implementation with Executable Models
COP 3813 Intro to Internet Computing
Web Design and Development
DR. JOHN ABRAHAM PROFESSOR UTPA
Introduction to AJAX and JSON
Class 4: Building Interactive Web Pages
Chapter 7 Software Testing.
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Presentation transcript:

1 State-Based Testing of Ajax Web Applications A. Marchetto, P. Tonella and F. Ricca CMSC737 Spring 2008 Shashvat A Thakor

2 Outline Introduction Ajax Overview Ajax Testing  Model Extraction  Semantic Interactions  Test Case Derivation  Asynchronism warnings Experiment Results Conclusions and Future Work

3 Introduction What is so special about these web-sites?

4 A synchronous J avascript A nd X ML A group of technologies:  HTML and CSS for presentation  Dynamic display and interaction using the Document Object Model (DOM)  Asynchronous data retrieval from server using XMLHttpRequest  Data interchange and manipulation by XML  Javascript for binding everything together.

5 Synchronous vs. Asynchronous Source: Adaptive Path

6 Ajax Testing Ajax faults are associated with  Asynchronous messages Unintended interleaving of server messages Swapped callbacks  DOM manipulation Incorrect DOM state Model Ajax applications by Finite State Machine (FSM)  States: DOM instances  Transitions: effects of callback executions

7 Model Extraction Dynamic analysis + static code analysis + manual validation step Cart application written in Ajax Starts with execution traces State abstraction function to get DOM states Only Method invocations changing DOM get selected as transitions Determine set of methods possibly affecting the DOM by means of a static code analysis – trace them

8 Model Extraction No execution trace covers dashed transition Hence, manual step to produce augmented FSM consisting of missing states and transitions Manual work depends upon number and quality of traces

9 Semantic Interaction For Cart example, add and rem interact semantically, since ≠

10 Test Case Derivation Sequence of semantically interacting events + input values from a database  executable test case Execute using Selenium ToolSelenium Tool Pass/Fail  Compare concrete state sequence w.r.t. state sequence of FSM  Checking the output value against a provided oracle  Whether application crashed or not! Rationale : Substantial reduction of test suite size by considering only semantically interacting events – hence event sequence of length 2 is more useful than covering all the paths of length 2

11 Asynchronous Warnings Detectected by AsyWarn2  Dependency analysis AsyWarn1  Sequentialize using request queue How to protect? AsyWarn2  Disable GUI widget associated with request depending upon a callback not yet executed

12 Experimental Results Goal: To study the advantages, effectiveness and effort involved in testing Ajax application taking into consideration semantic interactions, compared to Path Coverage Criteria Application under test: Tudu Tools  FSMInstrumentor  FSMExtractor  FSMTestCaseGenerator

13 Experimental Results FSMInstrumentor FSMExtractor DB FSMTestCaseGenerator Sequences of events of length k input Execution trace contains events triggering callback execution and concrete state of the Web page before and after callback execution, useful for FSM 21 different faults were considered for Tudu, hence 21 different versions of Tudu Generic as well as state- based faults Ajax Code Execution Trace FSM Test Cases

14 Experimental Results Size reduction achieved k is length of the sequence Substantial test suite size reduction achieved for semantically interacting sequences Faults revealed Functional coverage and semantic interactions appear to be complementary testing techniques (#7,#17 – #19,#20). Sequences of 3 different GUI-events necessary to find the bug

15 Experiment Results Traces needed for FSM Construction Both the curves reach a plateau around trace number 22. Manual efforts increase when the number of traces are insufficient to build complete FSM Manual Refinement Steps  Refinement steps can be automated partially or completely

16 Conclusions FSM can be used to describe Ajax applications, whose states are abstraction of DOM of the page manipulated by Ajax code and transitions are callback executions triggered by asynchronous messages received from the web server. Quality of traces play an important role in constructing accurate FSM as well as the level of automation achieved. The fault exposing power of semantic sequences grows with their length The experimental results were specific to Tudu, hence difficult to generalize to other applications having different characteristics from Tudu.

17 Future Work Investigate techniques to support the generation of longer sequences Adding data flow analysis required for asynchronous warning generation in the developed tools which can be useful to get the knowledge about dependency between callbacks and DOM elements.

18 Thank you!

19 Difference between and Ajax and GUI applications Asynchronous communication is present Callbacks are activated both by user events and by server messages Interface is manipulated by Ajax code through the DOM

20 Glossary DOM  Document Object Model  A platform- and language-independent standard object model for representing HTML or XML and related formats Abstract States  Refer Adabu ToolAdabu Tool