Automated Regression Testing of Ajax Web Applications

More Info
expand_more

Abstract

There is a growing trend of moving desktop applications to the Web by using AJAX to create user-friendly and interactive interfaces. Well-known examples include GMail, Hotmail, Google Wave and office applications. One common way to provide assurance about the correctness of such complex and evolving systems is through regression testing. Regression testing classical web applications has already been a notoriously daunting task because of the dynamism in web interfaces. AJAX applications pose an even greater challenge since the test case fragility degree is higher due to extensive run-time manipulation of the DOM tree, asynchronous client/server interactions, and (untyped) JAVASCRIPT. In this research, we propose a technique, in which we automatically infer a model of the web application and use this as an input for the test suite. We apply pipelined oracle comparators along with generated templates, to deal with the dynamic non-deterministic behavior in AJAX user interfaces. Our approach, implemented in the open source testing tool CRAWLJAX, provides a set of generic oracle comparators, template generators, and preconditions for handling the dynamic aspect of AJAX applications. We present a plugin that shows visualizations of test failure output in terms of differences between expected and observed DOM trees.We describe four case studies evaluating the effectiveness, scalability, and required manual effort of the approach and the applicability of CRAWLJAX in a real world production environment. The various improvements made to CRAWLJAX in this research are also discussed.

Files