Regardless of system type, testing is a key aspect of any software product and its development process. In this research, we investigate the use of clone detection techniques towards recommending test case templates to developers and maintainers. We introduce a novel recommendation approach that supports developers by deriving new unit test cases by mining software repositories. Our approach uses a programmer's current work context and then recommends unit test case examples which match closely this work context. We create first a traceable knowledge base from existing source code modules and their related unit test cases, by taking advantage of state of the art clone detection tools which are used for mining clones across project boundaries. We use these identified clone classes to match them with missing unit test cases within such clone classes. The results of a case study are presented illustrating the applicability of our approach.
[1]
Lionel C. Briand,et al.
A UML-Based Approach to System Testing
,
2001,
UML.
[2]
Roy P. Pargas,et al.
Test-Data Generation Using Genetic Algorithms
,
1999,
Softw. Test. Verification Reliab..
[3]
Gregory Tassey,et al.
Prepared for what
,
2007
.
[4]
Chanchal Kumar Roy,et al.
The NiCad Clone Detector
,
2011,
2011 IEEE 19th International Conference on Program Comprehension.
[5]
Jirapun Daengdej,et al.
A Test Case Generation Process and Technique
,
2010
.
[6]
Chanchal K. Roy,et al.
A Survey on Software Clone Detection Research
,
2007
.
[7]
Catherine Oriat,et al.
Jartege: A Tool for Random Generation of Unit Tests for Java Classes
,
2004,
QoSA/SOQUA.
[8]
Augusto Sampaio,et al.
Automatic Test-Case Generation
,
2007,
PSSE.