skip to main content
10.1145/2610384.2610399acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Virtual DOM coverage for effective testing of dynamic web applications

Published:21 July 2014Publication History

ABSTRACT

Test adequacy criteria are fundamental in software testing. Among them, code coverage criterion is widely used due to its simplicity and effectiveness. However, in dynamic web application testing, merely covering server-side script code is inadequate because it neglects client-side execution, which plays an important role in triggering client-server interactions to reach important execution states. Similarly, a criterion aiming at covering the UI elements on client-side pages ignores the server-side execution, leading to insufficiency.

In this paper, we propose Virtual DOM (V-DOM) Coverage, a novel criterion, for effective web application testing. With static analysis, we first aggregate all the DOM objects that may be produced by a piece of server script to construct a V-DOM tree. The tree models execution on both the client- and server-sides such that V-DOM coverage is more effective than existing coverage criteria in web application testing. We conduct an empirical study on five real world dynamic web applications. We find that V-DOM tree can model much more DOM objects than a web crawling based technique. Test selection based on V-DOM tree criterion substantially outperforms the existing code coverage and UI element coverage, by detecting more faults.

References

  1. Phc: open source PHP compiler. http://www.phpcompiler.org/.Google ScholarGoogle Scholar
  2. The LLVM Project: a collection of modular and reusable compiler and toolchain technologies. http://llvm.org/Google ScholarGoogle Scholar
  3. Selenium: web browser automation. http://www.seleniumhq.org/.Google ScholarGoogle Scholar
  4. S. Elbaum, G. Rothermel, S. Kanduri, and A. Malishevsky. Selecting a cost-effective test case prioritization technique. Software Quality Journal, 12(3):185–210, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Alshahwan, M. Harman, A. Marchetto, and P. Tonella. Improving web application testing using testability measures. In WSE’09, pages 49–58, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  6. C. Fang, Z. Chen, and B. Xu. Comparing logic coverage criteria on test case prioritization. Science China Information Sciences, 55(12):2826–2840, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  7. P. Ammann and J. Offutt. Introduction to Software Testing. Cambridge University Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Artzi, A. Kiezun, J. Dolby, F. Tip, D. Dig, and A. Paradkar. Finding bugs in dynamic web applications In ISSTA’08, pages 261–272, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. Boldi, B. Codenotti, M. Santini, and S. Vigna. Ubicrawler: A scalable fully distributed web crawler. Software: Practice and Experience, 34(8):711–726, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Brin and L. Page. The anatomy of a large-scale hypertextual web search engine. Computer Networks and ISDN Systems, 30(1):107–117, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Burner. Crawling towards eternity: Building an archive of the World Wide Web. Web Techniques Magazine, 2(5), 1997.Google ScholarGoogle Scholar
  12. J. Cho and H. Garcia-Molina. Parallel crawlers. Technical report, 2001.Google ScholarGoogle Scholar
  13. A. Christensen, A. Feldthaus, and A. Moller. Precise analysis of string expressions. In SAS’03, pages 1–18, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Duda, G. Frey, D. Kossmann, R. Matter, and C. Zhou. Ajax crawl: making AJAX applications searchable. In ICDE’09, pages 78–89, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Frankl and E. Weyuker. An applicable family of data flow testing criteria. IEEE Transactions on Software Engineering, 14(10):1483–1498, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. E. Geay, M. Pistoia, B. Ryder, and J. Dolby. Modular string-sensitive permission analysis with demand-driven preciion. In ICSE’09, pages 177–187, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Hooimeijier and W. Weimer. A decision procedure for subset constraints over regular languages. In PLDI’09, pages 188–198, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Kiezun, V. Ganesh, P. Guo, P. Hooimeijier, and M. Ernst. A solver for string constraints. In ISSTA’09, pages 105–116, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Kung, C. Liu, and P. Hsia. An object-oriented web test model for testing web applications. In APAQS’00, pages 111–120, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Liu, D. Kung, and P. Hsia. Object-based data flow testing of web applications. In APAQS’00, pages 7–16, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. Lucca, A. Fasolino, F. Faralli, and U. Carlini. Testing web applications. In ICSM’2002, pages 310–319, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Mesbah, E. Bozdag, and A. van Deursen. Crawling AJAX by inferring user interface state changes. In ICWE’08, pages 122–134, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Y. Minamide. Static approximation of dynamically generated web pages. In WWW’05, pages 432–441, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Namin and J. Andrews. The influence of size and coverage on test suite effectiveness. In ISSTA’09, pages 57–68, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. F. Ricca and P. Tonella. Analysis and testing of web applications. In ICSE’01, pages 25–34, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. T. Tateishi, M. Pistoia, and O. Tripp. Path- and index-sensitive string analysis based on monadic second-order logic. In ISSTA’11, pages 166–176, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Tonella, F. Ricca, E. Pianta, and G. C. Evaluation methods for web application clustering. In WSE’03, pages 33–40, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  28. G. Wassermann and Z. Su. Sound and precise analysis of web applications for injection vulnerabilities. In PLDI’07, pages 32–41, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G. Wassermann, D. Yu, A. Chander, D. Dhurjati, H. Inamura and Z. Su. Dynamic test input generation for web applications. In ISSTA’08, pages 249-260, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Y. Wei, M. Oriol, and B. Meyer. Is coverage a good measure of testing effectiveness? Technical report, ETH Zurich, 2010.Google ScholarGoogle Scholar
  31. H. Samimi, M. Schäfer, S. Artzi, T. Millstein, F. Tip, and L. Hendren. Automated repair of HTML generation errors in PHP applications using string constraint solving. in ICSE’12, pages 277-287, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Y. Zou, C. Fang, Z. Chen, X. Zhang, and Z. Zhao. A hybrid coverage criterion for dynamic web testing. in SEKE’13, 2013.Google ScholarGoogle Scholar
  33. A. Memon, M. Soffa, and M. Pollack. Coverage criteria for GUI testing. in FSE’01, pages 256–267, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Virtual DOM coverage for effective testing of dynamic web applications

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                ISSTA 2014: Proceedings of the 2014 International Symposium on Software Testing and Analysis
                July 2014
                460 pages
                ISBN:9781450326452
                DOI:10.1145/2610384

                Copyright © 2014 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 21 July 2014

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                Overall Acceptance Rate58of213submissions,27%

                Upcoming Conference

                ISSTA '24

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader