Abstract
AngularJS is a popular framework for single page web applications. Due to separation of programming logic and GUI, the data and control flow in AngularJS applications are usually hard to track. We propose a white-box method for first integrating the separate concerns into one interaction diagram, which contains the overall data and control flow of a program, and then separating user interactions from each other. With the help of the interactions, our method helps to achieve a better understanding of AgnularJS-based single page web applications, and moreover provides novel test coverage criteria for them.
Partially supported by the EU project cAPITs and the German BMBF project deep. TEACHING (01IS17056).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The project is available under https://bitbucket.org/gefei/angularjs-example.
- 2.
There is some subtle difference between the semantics of and double braces, see https://stackoverflow.com/a/16126174. However, the difference is not relevant for our discussion. In this paper, we consider and double braces as equivalent.
- 3.
Precisely, HTML tags may be nested, thus the HTML template is a tree. In this paper, we do not consider nesting tags, and just view the template as a set.
- 4.
Although it is also possible for a function to call another function, it is usually not necessary and not a good idea.
References
Alimadadi, S., Mesbah, A., Pattabiraman, K.: Hybrid DOM-sensitive change impact analysis for JavaScript. In: Proceedings of the 29th European Conference on Object-Oriented Programming (ECOOP 2015), pp. 321–345 (2015)
Dhok, M., Ramanathan, M.K., Sinha, N.: Type-aware concolic testing of JavaScript programs, pp. 168–179. ACM (2016)
Google. AngularJS. https://angularjs.org/
Jensen, S.H., Madsen, M., Møller, A.: Modeling the HTML DOM and browser API in static analysis of JavaScript Web Applications. In: Proceedings of the 19th ACM SIGSOFT Symposium Foundations of Software Engineering and 13th European Software Engineering Conference (FSE/ESEC 2011), pp. 59–69. ACM (2011)
Materne, D.: Interaktionsanalayse von AngularJS-Programmen. Master’s thesis, Hochschule für Technik und Wirtschaft Berlin (2018). (in German)
Mesbah, A.: Advances in testing JavaScript-based Web Applications. Adv. Comput. 97, 201–235 (2015)
Mirshokraie, S., Mesbah, A., Pattabiraman, K.: JSEFT: automated Javascript unit test generation. In: 8th IEEE International Conference on Software Testing, Verification and Validation, ICST 2015, pp. 1–10. IEEE Computer Society (2015)
Mozilla. JavaScript object basics (2018). https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics
Ocariza Jr., F.S., Pattabiraman, K., Mesbah, A.: Detecting inconsistencies in JavaScript MVC applications. In: Proceedings of the 37th International Conference on Software Engineering (ICSE 2015), vol. 1, pp. 325–335. IEEE Computer Society (2015)
Park, C., Won, S., Jin, J., Ryu, S.: Static analysis of JavaScript Web Applications in the wild via practical DOM modeling. In: Proceedings of the 30th International Conference on Automated Software Engineering (ASE 2015), pp. 552–562. IEEE Computer Society (2015)
Sun, K., Ryu, S.: Analysis of JavaScript programs: challenges and research trends. ACM Comput. Surv. 50(4), 59:1–59:34 (2017)
van Deursen, A.: Testing Web Applications with state objects. Comm. ACM 58(8), 36–43 (2015)
Wikipedia. Model view ViewModel (2015). https://en.wikipedia.org/w/index.php?title=Model_View_ViewModel&oldid=675433955
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Zhang, G., Zhao, J. (2020). Scenario Testing of AngularJS-Based Single Page Web Applications. In: Brambilla, M., Cappiello, C., Ow, S. (eds) Current Trends in Web Engineering. ICWE 2019. Lecture Notes in Computer Science(), vol 11609. Springer, Cham. https://doi.org/10.1007/978-3-030-51253-8_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-51253-8_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-51252-1
Online ISBN: 978-3-030-51253-8
eBook Packages: Computer ScienceComputer Science (R0)