25.07.2014 Views

Analysis and Testing of Ajax-based Single-page Web Applications

Analysis and Testing of Ajax-based Single-page Web Applications

Analysis and Testing of Ajax-based Single-page Web Applications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

open source, distributed, automated testing framework <strong>and</strong> how it helps to<br />

obtain reliable data from different web application settings. Using Chiron,<br />

Chapter 4 discusses an experiment that reveals the differences between traditional<br />

pull <strong>and</strong> Comet-<strong>based</strong> push solutions in terms <strong>of</strong> data coherence,<br />

scalability, network usage, <strong>and</strong> reliability. Such a study helps s<strong>of</strong>tware engineers<br />

to make rational decisions concerning key parameters such as publish<br />

<strong>and</strong> pull intervals, in relation to, for instance, the anticipated number <strong>of</strong> web<br />

clients.<br />

Chapter 5 discusses the challenges <strong>of</strong> crawling <strong>Ajax</strong> automatically, <strong>and</strong> proposes<br />

a new method for crawling <strong>Ajax</strong> through dynamic analysis <strong>of</strong> the user<br />

interface. The method, implemented in an open source tool called Crawljax,<br />

automatically infers a state-flow graph <strong>of</strong> the application by, simulating user<br />

events on interface elements, <strong>and</strong> analyzing the internal DOM state, modeling<br />

the various navigational paths <strong>and</strong> states within an <strong>Ajax</strong> application.<br />

Such a crawling technique has various applications. First, it can serve as a<br />

starting point for adoption by general search engines. Second, such a crawler<br />

can be used to expose the <strong>Ajax</strong> induced hidden content on the web by automatically<br />

generating a static version <strong>of</strong> the dynamic user interface (Mesbah<br />

<strong>and</strong> van Deursen, 2008b). In addition, the ability to automatically exercise<br />

all the executable elements <strong>of</strong> an <strong>Ajax</strong> user interface gives us a powerful test<br />

mechanism, which brings us to Chapter 6.<br />

In Chapter 6, we present an automatic testing method that can dynamically<br />

make a full pass over an <strong>Ajax</strong> application, <strong>and</strong> examine the user interface behavior.<br />

To that end, the crawler from Chapter 5 is extended with data entry<br />

point h<strong>and</strong>ling to trigger faults through input values. With access to different<br />

dynamic DOM states we can check the user interface against different constraints.<br />

We propose to express those as invariants on the DOM tree, <strong>and</strong><br />

the inferred state machine, which can be checked automatically in any state.<br />

Such invariants are used as oracles, to deal with the well-known oracle problem.<br />

We present our open source testing tool called Atusa, implementing<br />

the approach, <strong>of</strong>fering generic invariant checking components, as well as a<br />

plugin-mechanism to add application-specific state validators, <strong>and</strong> test suite<br />

generation from the inferred state machine. This tool is used in a number <strong>of</strong><br />

case studies to investigate the actual fault revealing capabilities <strong>and</strong> automation<br />

level <strong>of</strong> the tool.<br />

1.6 Origin <strong>of</strong> Chapters <strong>and</strong> Acknowledgments<br />

Each main chapter in this thesis is directly <strong>based</strong> on (at least) one peer reviewed<br />

publication. While all chapters have distinct core contributions, there<br />

is some redundancy, in the introduction <strong>of</strong> background material <strong>and</strong> motivation,<br />

to ensure each chapter is self-contained <strong>and</strong> can be read independent <strong>of</strong><br />

the others.<br />

The author <strong>of</strong> this thesis is the main contributor <strong>of</strong> all chapters except Chapter<br />

4, in which the first two authors, Engin Bozdag <strong>and</strong> the author, contributed<br />

20 1.6. Origin <strong>of</strong> Chapters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!