Generating and Contributing Test Cases for C Libraries from Client Code: A Case Study
Software libraries are at the core of software development, and any bugs can affect a potentially large number of present and future client applications. Therefore, thorough testing of libraries is of key importance. Unfortunately, writing library test cases is often difficult, requiring awareness of complex data structures and preconditions.
We report our experience implementing APISLICER, a technique (and tool) which starting from the client of a library under test, extracts self-contained library test cases that can be used to enhance the library’s test suite. Such test cases provide a key benefit: they represent real-world usage scenarios of the APIs exported by the target library, which may not have been envisioned by the library developers.
We have conducted a case study in which we have applied APISLICER on seven mature libraries, with a total of twelve clients. Our experience highlights that while APISLICER has successfully extracted compilable test cases for all these libraries, library developers are oftentimes cautious about accepting the test cases. Out of seven libraries, three (LIBUNISTRING, AMPLGSL, and GSL) accepted our contributions. We report on the reaction of the developers to our contributions and more generally on the opportunities and challenges facing this approach.
Thu 6 MarDisplayed time zone: Eastern Time (US & Canada) change
11:00 - 12:30 | Software Testing & DebuggingResearch Papers at L-1710 Chair(s): Coen De Roover Vrije Universiteit Brussel | ||
11:00 15mTalk | A Multi-Language Tool for Generating Unit Tests from Execution Traces Research Papers Gabriel Darbord Inria, Nicolas Anquetil University of Lille, Lille, France, Anne Etien Université de Lille, CNRS, Inria, Centrale Lille, UMR 9189 –CRIStAL, Benoit Verhaeghe Berger-Levrault | ||
11:15 15mTalk | CSE-WSS: Code Structure Enhancement Framework with Weighted Semantic Similarity for Changeset-based Bug Localization Research Papers Zhenghao Liu School of Software Engineering, South China University of Technology, Guangzhou, China, Li Yuan School of Software Engineering, South China University of Technology, Guangzhou, China, Jiexin Wang School of Software Engineering, South China University of Technology, Guangzhou, China, Yi Cai School of Software Engineering, South China University of Technology, Guangzhou, China | ||
11:30 15mTalk | From Bug Reports to Workarounds: The Real-World Impact of Compiler Bugs Research Papers | ||
11:45 15mTalk | Optimizing Class Integration Testing with Criticality-Driven Test Order Generation Research Papers yanru ding China University of Mining and Technology, Yanmei ZHANG China University of Mining and Technology, Guan Yuan China University of Mining and Technology, Shujuan Jiang China University of Mining and Technology, Wei Dai China University of Mining and Technology, Luciano Baresi Politecnico di Milano | ||
12:00 15mTalk | Generating and Contributing Test Cases for C Libraries from Client Code: A Case Study Research Papers Ahmed Zaki Imperial College London, Arindam Sharma Imperial College London, Cristian Cadar Imperial College London |