Skip to main content

Scenario Testing of AngularJS-Based Single Page Web Applications

  • Conference paper
  • First Online:
Current Trends in Web Engineering (ICWE 2019)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 11609))

Included in the following conference series:

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).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The project is available under https://bitbucket.org/gefei/angularjs-example.

  2. 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. 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. 4.

    Although it is also possible for a function to call another function, it is usually not necessary and not a good idea.

References

  1. 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)

    Google Scholar 

  2. Dhok, M., Ramanathan, M.K., Sinha, N.: Type-aware concolic testing of JavaScript programs, pp. 168–179. ACM (2016)

    Google Scholar 

  3. Google. AngularJS. https://angularjs.org/

  4. 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)

    Google Scholar 

  5. Materne, D.: Interaktionsanalayse von AngularJS-Programmen. Master’s thesis, Hochschule für Technik und Wirtschaft Berlin (2018). (in German)

    Google Scholar 

  6. Mesbah, A.: Advances in testing JavaScript-based Web Applications. Adv. Comput. 97, 201–235 (2015)

    Article  Google Scholar 

  7. 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)

    Google Scholar 

  8. Mozilla. JavaScript object basics (2018). https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. Sun, K., Ryu, S.: Analysis of JavaScript programs: challenges and research trends. ACM Comput. Surv. 50(4), 59:1–59:34 (2017)

    Article  Google Scholar 

  12. van Deursen, A.: Testing Web Applications with state objects. Comm. ACM 58(8), 36–43 (2015)

    Article  Google Scholar 

  13. Wikipedia. Model view ViewModel (2015). https://en.wikipedia.org/w/index.php?title=Model_View_ViewModel&oldid=675433955

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gefei Zhang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics