Improving Tese Case Generation for Python Native Libraries Through Constraints on Input Data Structures
Xin Zhang, Xutong Ma, Jiwen Yan, Baoquan Cui, Jun Yan, Jian Zhang

TL;DR
This paper presents PyCing, a novel approach for generating test cases for Python native libraries by constraining input data structures based on interactions with the Python VM, improving coverage and bug detection.
Contribution
It introduces a Python-level instrumentation method to derive input constraints for native libraries, enhancing test coverage and bug detection over existing approaches.
Findings
PyCing covers more execution paths than existing tools.
PyCing detects segmentation faults and memory leaks effectively.
Instrumentation has minimal impact on testing efficiency.
Abstract
Modern Python projects execute computational functions using native libraries and give Python interfaces to boost execution speed; hence, testing these libraries becomes critical to the project's robustness. One challenge is that existing approaches use coverage to guide generation, but native libraries run as black boxes to Python code with no execution information. Another is that dynamic binary instrumentation reduces testing performance as it needs to monitor both native libraries and the Python virtual machine. To address these challenges, in this paper, we propose an automated test case generation approach that works at the Python code layer. Our insight is that many path conditions in native libraries are for processing input data structures through interacting with the VM. In our approach, we instrument the Python Interpreter to monitor the interactions between native…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software System Performance and Reliability
