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.
4.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />
4.7.1 The Research Questions Revisited . . . . . . . . . . . . . 98<br />
4.7.2 Threats to Validity . . . . . . . . . . . . . . . . . . . . . . 101<br />
4.8 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103<br />
4.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . 104<br />
5 Crawling <strong>Ajax</strong> by Inferring User Interface State Changes 107<br />
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />
5.2 Challenges <strong>of</strong> Crawling <strong>Ajax</strong> . . . . . . . . . . . . . . . . . . . . 109<br />
5.2.1 Client-side Execution . . . . . . . . . . . . . . . . . . . . 109<br />
5.2.2 State Changes & Navigation . . . . . . . . . . . . . . . . 109<br />
5.2.3 Dynamic Document Object Model (DOM) . . . . . . . . 109<br />
5.2.4 Delta-communication . . . . . . . . . . . . . . . . . . . . 110<br />
5.2.5 Elements Changing the Internal State . . . . . . . . . . . 110<br />
5.3 A Method for Crawling <strong>Ajax</strong> . . . . . . . . . . . . . . . . . . . . 111<br />
5.3.1 User Interface States . . . . . . . . . . . . . . . . . . . . . 111<br />
5.3.2 The State-flow Graph . . . . . . . . . . . . . . . . . . . . 111<br />
5.3.3 Inferring the State Machine . . . . . . . . . . . . . . . . . 112<br />
5.3.4 Detecting Clickables . . . . . . . . . . . . . . . . . . . . . 112<br />
5.3.5 Creating States . . . . . . . . . . . . . . . . . . . . . . . . 115<br />
5.3.6 Processing Document Tree Deltas . . . . . . . . . . . . . 115<br />
5.3.7 Navigating the States . . . . . . . . . . . . . . . . . . . . 115<br />
5.3.8 CASL: Crawling <strong>Ajax</strong> Specification Language . . . . . . 117<br />
5.3.9 Generating Indexable Pages . . . . . . . . . . . . . . . . . 117<br />
5.4 Tool Implementation: Crawljax . . . . . . . . . . . . . . . . . . 118<br />
5.5 Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />
5.5.1 Subject Systems . . . . . . . . . . . . . . . . . . . . . . . . 119<br />
5.5.2 Experimental Design . . . . . . . . . . . . . . . . . . . . . 120<br />
5.5.3 Results <strong>and</strong> Evaluation . . . . . . . . . . . . . . . . . . . 121<br />
5.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123<br />
5.6.1 Back Implementation . . . . . . . . . . . . . . . . . . . . 123<br />
5.6.2 Constantly Changing DOM . . . . . . . . . . . . . . . . . 123<br />
5.6.3 Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123<br />
5.6.4 State Space . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br />
5.7 <strong>Applications</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br />
5.7.1 Search Engines . . . . . . . . . . . . . . . . . . . . . . . . 124<br />
5.7.2 Discoverability . . . . . . . . . . . . . . . . . . . . . . . . 125<br />
5.7.3 <strong>Testing</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126<br />
5.8 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />
5.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />
6 Invariant-Based Automatic <strong>Testing</strong> <strong>of</strong> <strong>Ajax</strong> User Interfaces 129<br />
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />
6.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br />
6.3 <strong>Ajax</strong> <strong>Testing</strong> Challenges . . . . . . . . . . . . . . . . . . . . . . . 132<br />
6.3.1 Reach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132<br />
vi<br />
Contents