Generating and contributing test cases for C libraries from client code: a case study
File(s)main.pdf (267.49 KB)
Accepted version
Author(s)
Ahmed, Zaki
Arindam, Sharma
Cadar, Cristian
Type
Conference Paper
Abstract
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.
Date Issued
2025-05-21
Date Acceptance
2024-12-01
Citation
2025 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER, 2025
ISBN
979-8-3315-3511-7
ISSN
1534-5351
Publisher
IEEE
Journal / Book Title
2025 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER
Copyright Statement
Copyright © ©2025 IEEE. This is the author’s accepted manuscript made available under a CC-BY licence in accordance with Imperial’s Research Publications Open Access policy (www.imperial.ac.uk/oa-policy)
License URL
Sponsor
European Research Council (ERC)
Grant Number
819141
Source
IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER 2025)
Place of Publication
Montreal, QC, Canada
Publication Status
Published
Start Date
2025-03-04
Finish Date
2025-03-07
Coverage Spatial
Montreal, Quebec, Canada
Date Publish Online
2025-05-21