Authors:
Fadel Toure
1
;
Mourad Badri
1
and
Luc Lamontagne
2
Affiliations:
1
University of Quebec, Canada
;
2
University of Laval, Canada
Keyword(s):
Tests Prioritization, Unit Tests, Source Code Metrics, Logistic Regression, Machine Learning.
Related
Ontology
Subjects/Areas/Topics:
Software Engineering
;
Software Metrics
;
Software Project Management
Abstract:
In object-oriented software, unit testing is a level of software testing where each individual class is tested by a dedicated unit test class. Unfortunately, due to time and resources constraints, this phase does not cover all classes. The testing efforts are often focused on particular classes. In this paper, we investigate an approach based on software information history to support the prioritization of classes to be tested. To achieve this goal, we first analyzed different attributes of ten open-source Java software systems for which JUnit test cases have been developed for several classes. We used the mean and the logistic regression analysis to characterize the classes for which JUnit test classes have been developed by testers. Second, we used two classifiers trained on metrics values and unit tests information collected from the selected systems. The classifiers provide, for each software, a set of classes on which unit testing efforts have to be focused. The obtained sets ha
ve been compared to the sets of classes for which JUnit test classes have been developed by testers. Results show that: (1) the metrics average values of tested classes are significantly different from the metrics average values of other classes, (2) there is a significant relationship between the fact that a JUnit test class has been developed for a class and its attributes, and (3) the sets of classes suggested by classifiers reflect the testers’ selection properly.
(More)