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
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Algorithm 5 InCrawling hook while deriving <strong>Ajax</strong> states<br />
1: procedure GenerateEvent (State cs, Clickable c)<br />
2: robot.fireEvent(c)<br />
3: dom ← browser.getDom()<br />
4: if distance(cs.getDom(), dom) > τ then<br />
5: xe ← getXpathExpr(c)<br />
6: ns ← State(dom)<br />
7: sm.addState(ns)<br />
8: sm.addEdge(cs, ns, Event(c, xe))<br />
9: sm.changeState(ns)<br />
10: inCrawlingPlugins(ns)<br />
11: crawl(cs)<br />
12: sm.changeState(cs)<br />
13: if browser.history.canBack then<br />
14: browser.history.goBack()<br />
15: else<br />
16: browser.reload()<br />
17: List E ← sm.getPathTo(cs)<br />
18: for e ∈ E do<br />
19: robot.fireEvent(e)<br />
20: end for<br />
21: end if<br />
22: end if<br />
23: end procedure<br />
6.9 Empirical Evaluation<br />
In order to assess the usefulness <strong>of</strong> our approach in supporting modern web<br />
application testing, we have conducted a number <strong>of</strong> case studies, set up following<br />
Yin’s guidelines (Yin, 2003).<br />
Goal <strong>and</strong> Research Questions. Our goal in this experiment is to evaluate<br />
the fault revealing capabilities, scalability, required manual effort <strong>and</strong> level <strong>of</strong><br />
automation <strong>of</strong> our approach. Our research questions can be summarized as:<br />
RQ1 What is the fault revealing capability <strong>of</strong> Atusa?<br />
RQ2 How well does Atusa perform? Is it scalable?<br />
RQ3 What is the automation level when using Atusa <strong>and</strong> how much manual<br />
effort is involved in the testing process?<br />
6.9.1 Study 1: TUDU<br />
Our first experimental subject is the <strong>Ajax</strong>-<strong>based</strong> open source TUDU 9 web application<br />
for managing personal todo lists, which has also been used by other<br />
9 http://tudu.sourceforge.net<br />
142 6.9. Empirical Evaluation