Affiliation:
1. TU Darmstadt, Germany
2. n.n., n.n.
3. Northeastern University, USA
Abstract
Test generation has proven to provide an effective way of identifying programming errors. Unfortunately, current test generation techniques are challenged by higher-order functions in dynamic languages, such as JavaScript functions that receive callbacks. In particular, existing test generators suffer from the unavailability of statically known type signatures, do not provide functions or provide only trivial functions as inputs, and ignore callbacks triggered by the code under test. This paper presents LambdaTester, a novel test generator that addresses the specific problems posed by higher-order functions in dynamic languages. The approach automatically infers at what argument position a method under test expects a callback, generates and iteratively improves callback functions given as input to this method, and uses novel test oracles that check whether and how callback functions are invoked. We apply LambdaTester to test 43 higher-order functions taken from 13 popular JavaScript libraries. The approach detects unexpected behavior in 12 of the 13 libraries, many of which are missed by a state-of-the-art test generator.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference61 articles.
1. Understanding JavaScript event-based interactions
2. Esben Andreasen Liang Gong Anders Møller Michael Pradel Marija Selakovic Koushik Sen and Cristian-Alexandru Staicu. 2017. A Survey of Dynamic Analysis and Test Generation for JavaScript. Comput. Surveys (2017). 10.1145/3106739 Esben Andreasen Liang Gong Anders Møller Michael Pradel Marija Selakovic Koushik Sen and Cristian-Alexandru Staicu. 2017. A Survey of Dynamic Analysis and Test Generation for JavaScript. Comput. Surveys (2017). 10.1145/3106739
3. Adaptive random testing
4. Shay Artzi Julian Dolby Simon Holm Jensen Anders Møller and Frank Tip. 2011. A framework for automated testing of JavaScript web applications. In ICSE. 571–580. 10.1145/1985793.1985871 Shay Artzi Julian Dolby Simon Holm Jensen Anders Møller and Frank Tip. 2011. A framework for automated testing of JavaScript web applications. In ICSE. 571–580. 10.1145/1985793.1985871
5. Korat
Cited by
17 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generation;IEEE Transactions on Software Engineering;2024-01
2. Code Coverage Criteria for Asynchronous Programs;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30
3. JavaScript SBST Heuristics to Enable Effective Fuzzing of NodeJS Web APIs;ACM Transactions on Software Engineering and Methodology;2023-09-28
4. An empirical study of automated unit test generation for Python;Empirical Software Engineering;2023-01-31
5. Predicting Patch Correctness Based on the Similarity of Failing Test Cases;ACM Transactions on Software Engineering and Methodology;2022-08-22