TY - JOUR
T1 - Synthesizing method sequences for high-coverage testing
AU - Thummalapenta, Suresh
AU - Xie, Tao
AU - Tillmann, Nikolai
AU - De Halleux, Jonathan
AU - Su, Zhendong
PY - 2011/10
Y1 - 2011/10
N2 - High-coverage testing is challenging. Modern object-oriented programs present additional challenges for testing. One key difficulty is the generation of proper method sequences to construct desired objects as method parameters. In this paper, we cast the problem as an instance of program synthesis that automatically generates candidate programs to satisfy a user-specified intent. In our setting, candidate programs are method sequences, and desired object states specify an intent. Automatic generation of desired method sequences is difficult due to its large search space-sequences often involve methods from multiple classes and require specific primitive values. This paper introduces a novel approach, called Seeker, to intelligently navigate the large search space. Seeker synergistically combines static and dynamic analyses: (1) dynamic analysis generates method sequences to cover branches; (2) static analysis uses dynamic analysis information for not-covered branches to generate candidate sequences; and (3) dynamic analysis explores and eliminates statically generated sequences. For evaluation, we have implemented Seeker and demonstrate its effectiveness on four subject applications totalling 28K LOC. We show that Seeker achieves higher branch coverage and def-use coverage than existing state-of-the-art approaches. We also show that Seeker detects 34 new defects missed by existing tools..
AB - High-coverage testing is challenging. Modern object-oriented programs present additional challenges for testing. One key difficulty is the generation of proper method sequences to construct desired objects as method parameters. In this paper, we cast the problem as an instance of program synthesis that automatically generates candidate programs to satisfy a user-specified intent. In our setting, candidate programs are method sequences, and desired object states specify an intent. Automatic generation of desired method sequences is difficult due to its large search space-sequences often involve methods from multiple classes and require specific primitive values. This paper introduces a novel approach, called Seeker, to intelligently navigate the large search space. Seeker synergistically combines static and dynamic analyses: (1) dynamic analysis generates method sequences to cover branches; (2) static analysis uses dynamic analysis information for not-covered branches to generate candidate sequences; and (3) dynamic analysis explores and eliminates statically generated sequences. For evaluation, we have implemented Seeker and demonstrate its effectiveness on four subject applications totalling 28K LOC. We show that Seeker achieves higher branch coverage and def-use coverage than existing state-of-the-art approaches. We also show that Seeker detects 34 new defects missed by existing tools..
KW - Object-oriented testing
KW - Symbolic execution
UR - http://www.scopus.com/inward/record.url?scp=84858310869&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84858310869&partnerID=8YFLogxK
U2 - 10.1145/2076021.2048083
DO - 10.1145/2076021.2048083
M3 - Article
AN - SCOPUS:84858310869
SN - 1523-2867
VL - 46
SP - 189
EP - 206
JO - ACM SIGPLAN Notices
JF - ACM SIGPLAN Notices
IS - 10
ER -