In-Situ Concolic Testing of JavaScript
Authors:
- 1 March 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 236-247
Abstract
JavaScript (JS) has evolved into a versatile and popular programming language for not only the web, but also a wide range of server-side and client-side applications. Effective, efficient, and easy-to-use testing techniques for JS scripts are in great demand. In this paper, we introduce a holistic approach to applying concolic testing to JS scripts in-situ, i.e., JS scripts are executed in their native environments as part of concolic execution and test cases generated are directly replayed in these environments. We have implemented this approach in the context of Node.js, a JS runtime built on top of Chrome’s V8 JS engine, and evaluated its effectiveness and efficiency through application to 180 Node.js libraries with heavy use of string operations. For 85% of these libraries, it achieved statement coverage ranging between 75% and 100%, a close match in coverage with the hand-crafted unit test suites accompanying their NPM releases. Our approach detected numerous exceptions in these libraries. We analyzed the exception reports for 12 representative libraries and found 6 bugs in these libraries, 4 of which are previously undetected. The bug reports and patches that we filed for these bugs have been accepted by the library developers on GitHub.Keywords
Funding Information
- National Science Foundation
This publication has 26 references indexed in Scilit:
- JSEFT: Automated Javascript Unit Test Generation2015
- The Scalable Commutativity RuleACM Transactions on Computer Systems, 2015
- Two decades of Web application testing—A survey of recent advancesInformation Systems, 2014
- Predicting SQL injection and cross site scripting vulnerabilities through mining input sanitization patternsInformation and Software Technology, 2013
- Finding Errors in Python Programs Using Dynamic Symbolic Execution2013
- SAGECommunications of the ACM, 2012
- S2EACM SIGPLAN Notices, 2011
- BitBlaze: A New Approach to Computer Security via Binary Analysis2008
- CUTEACM SIGSOFT Software Engineering Notes, 2005
- Symbolic execution and program testingCommunications of the ACM, 1976