DocumentCode :
271700
Title :
Instance Generator and Problem Representation to Improve Object Oriented Code Coverage
Author :
Sakti, Abdelilah ; Pesant, Gilles ; Guéhéneuc, Yann-Gaël
Author_Institution :
Dept. of Comput. & Software Eng., Ecole Polytech. de Montreal, Montreal, QC, Canada
Volume :
41
Issue :
3
fYear :
2015
fDate :
March 1 2015
Firstpage :
294
Lastpage :
313
Abstract :
Search-based approaches have been extensively applied to solve the problem of software test-data generation. Yet, test-data generation for object-oriented programming (OOP) is challenging due to the features of OOP, e.g., abstraction, encapsulation, and visibility that prevent direct access to some parts of the source code. To address this problem we present a new automated search-based software test-data generation approach that achieves high code coverage for unit-class testing. We first describe how we structure the test-data generation problem for unit-class testing to generate relevant sequences of method calls. Through a static analysis, we consider only methods or constructors changing the state of the class-under-test or that may reach a test target. Then we introduce a generator of instances of classes that is based on a family of means-of-instantiation including subclasses and external factory methods. It also uses a seeding strategy and a diversification strategy to increase the likelihood to reach a test target. Using a search heuristic to reach all test targets at the same time, we implement our approach in a tool, JTExpert, that we evaluate on more than a hundred Java classes from different open-source libraries. JTExpert gives better results in terms of search time and code coverage than the state of the art, EvoSuite, which uses traditional techniques.
Keywords :
Java; object-oriented programming; program diagnostics; program testing; public domain software; EvoSuite; JTExpert; Java class evaluation; OOP; abstraction; automated search-based software test-data generation approach; class-under-test; diversification strategy; encapsulation; instance generator; means-of-instantiation; method call sequences; object oriented code coverage; object-oriented programming; open-source libraries; problem representation; search heuristic; search time; search-based approach; seeding strategy; source code; static analysis; unit-class testing; visibility; Complexity theory; Generators; Java; Libraries; Production facilities; Search problems; Testing; Automatic Test Data Generation; Automatic test data generation; Diversification Strategy; Java Testing; Java testing; Search Based Software Testing; Seeding Strategy; Unit Class Testing; diversification strategy; search based software testing; seeding strategy; unit class testing;
fLanguage :
English
Journal_Title :
Software Engineering, IEEE Transactions on
Publisher :
ieee
ISSN :
0098-5589
Type :
jour
DOI :
10.1109/TSE.2014.2363479
Filename :
6926828
Link To Document :
بازگشت