The Community for Technology Leaders
2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE) (2017)
Urbana, IL, USA
Oct. 30, 2017 to Nov. 3, 2017
ISBN: 978-1-5386-3976-4
pp: 44-49
Luca Della Toffola , Department of Computer Science, ETH Zurich, Switzerland
Cristian-Alexandru Staicu , Department of Computer Science, TU Darmstadt, Germany
Michael Pradel , Department of Computer Science, TU Darmstadt, Germany
ABSTRACT
Automatically generating unit tests is a powerful approach to exercise complex software. Unfortunately, current techniques often fail to provide relevant input values, such as strings that bypass domain-specific sanity checks. As a result, state-of-the-art techniques are effective for generic classes, such as collections, but less successful for domain-specific software. This paper presents TestMiner, the first technique for mining a corpus of existing tests for input values to be used by test generators for effectively testing software not in the corpus. The main idea is to extract literals from thousands of tests and to adapt information retrieval techniques to find values suitable for a particular domain. Evaluating the approach with 40 Java classes from 18 different projects shows that TestMiner improves test coverage by 21% over an existing test generator. The approach can be integrated into various test generators in a straightforward way, increasing their effectiveness on previously difficult-to-test classes.
INDEX TERMS
Generators, Software, Testing, Indexes, Data mining, Computer science
CITATION

L. D. Toffola, C. Staicu and M. Pradel, "Saying ‘Hi!’ is not enough: Mining inputs for effective test generation," 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE), Urbana, IL, USA, 2017, pp. 44-49.
doi:10.1109/ASE.2017.8115617
166 ms
(Ver 3.3 (11022016))