Loading [MathJax]/extensions/MathMenu.js
String Test Data Generation for Java Programs | IEEE Conference Publication | IEEE Xplore

String Test Data Generation for Java Programs


Abstract:

Appropriate string test data generation is important for program testing. Complex string APIs combinations are commonly used to handle string parameters. However, the com...Show More

Abstract:

Appropriate string test data generation is important for program testing. Complex string APIs combinations are commonly used to handle string parameters. However, the complex combinations make it difficult to express comprehensive string related constraints and generate suitable string data to trigger bugs and cover more branches. In this paper, we propose a novel approach to characterize the input strings and their operations (API invocations) with the regular expressions for string test data generation, with insight that they support rich syntax and can express the semantics of various string APIs combinations. We build a set of mapping rules that map 48 string APIs in Java to regular expressions, and design an inference algorithm to generate regular expressions for the complex string APIs combinations. With these regular expressions, more effective string data can be generated in an efficient way. Experiments on multi-type programs from assignments, LeetCode platform and open source community show that our approach can increase the branch coverage (17%) and find more bugs (+81) than the existing work. For the basic library JDK, 17 defects have been found, of which 14 are confirmed by the JDK developers and 3 are fixed in new version.
Date of Conference: 31 October 2022 - 03 November 2022
Date Added to IEEE Xplore: 21 December 2022
ISBN Information:

ISSN Information:

Conference Location: Charlotte, NC, USA

Contact IEEE to Subscribe

References

References is not available for this document.