It would be possible to reduce this bias if we
consider a larger set formed by the union of classes
for which JUnit test classes have been written and
the classes that have been implicitly tested by
methods transitive calls.
7 CONCLUSIONS
We analyzed 10 open source software systems
containing more than 4400 classes for which testers
developed dedicated unit test classes using JUnit for
several classes of each system. The selection criteria
of classes that have been tested are not known. We
explored the possibility of explaining and reusing
these criteria for different systems through three
experiments using three source code metrics. We
first analyzed, for each system, the set of tested
classes and not-tested classes using the Z-Test.
Results show that for all metrics except CBO, the
mean values are significantly different and
consistent (the tested sets have higher average values
for LOC and WMC). Secondly, we performed a
binary univariate logistic regression analysis to
determine the individual effect of each metric on the
tested classes’ selection made by testers. Results
show a significant relationship with the considered
software metrics. We finally used multivariate LR
and NB classifiers to build models that support unit
tests prioritization. The goal was to compare classes
suggested by classifiers and the set of tested classes
provided by systems’ testers. The classifiers were
trained on each system dataset taken individually
and validated on the 9 remaining systems. Results
suggest that more than 70% of classes provided by
testers (tested classes) can be automatically
suggested by the classifiers. The results of this
experiment suggest the viability of a unit tests
prioritization automation technique using classifiers
trained on different software source code metrics
and history of the unit tests information. It would be
interesting to group systems according to their
domains, types and include other software source
code metrics such as RFC (Response For Class) to
observe the changes on results. It would also be
interesting to apply an adapted Leave-One-Out-
Validation technique (LOOV) by validating one
system with a classifier trained on the test
information of the remaining systems. We could
improve classifier performances, prevent overfitting
problems and be able to use more classifiers that
require a larger training datasets. Moreover, since
the proposed prioritization technique suggests a
slightly different (30%) set of classes from the
testers set of tested classes, it would be pertinent to
analyze and compare their actual performance on
covering faulty classes. This topic will be the next
direction of our investigations.
REFERENCES
Aggarwal K.K., Singh Y., Kaur A., and Malhotra R.,
2009. Empirical Analysis for Investigating the Effect
of Object-Oriented Metrics on Fault Proneness: A
Replicated Case Study, Software Process
Improvement and Practice, vol. 14, no. 1, pp. 39-62.
Badri L., Badri M. and Toure F., 2010. Exploring
Empirically the Relationship between Lack of
Cohesion and Testability in Object-Oriented Systems,
JSEA Eds., Advances in Software Engineering,
Communications in Computer and Information
Science, Vol. 117, Springer, Berlin.
Badri M. and Toure F., 2011. Empirical analysis for
investigating the effect of control flow dependencies
on testability of classes, in Proceedings of the 23rd
International Conference on Software Engineering and
Knowledge Engineering (SEKE '11).
Badri M. and Toure F., 2012. Empirical analysis of object
oriented design metrics for predicting unit testing
effort of classes, Journal of Software Engineering and
Applications (JSEA), Vol. 5 No. 7, pp.513-526.
Basili V.R., Briand L.C. and Melo W.L., 1996. A
Validation of Object-Oriented Design Metrics as
Quality Indicators, IEEE Transactions on Software
Engineering. vol. 22, no. 10, pp. 751-761.
Boehm B. and Basili V. R., 2001. Software defect
reduction top-10 list, Computer, vol. 34, no. 1, pp.
135–137.
Bruntink M., and Deursen A.V., 2004. Predicting Class
Testability using Object-Oriented Metrics, 4th Int.
Workshop on Source Code Analysis and Manipulation
(SCAM), IEEE.
Bruntink M. and Van Deursen A., 2006. An Empirical
Study into Class Testability, Journal of Systems and
Software, Vol. 79, No. 9, pp. 1219-1232.
Carlson R., Do H., and Denton A., 2011. A clustering
approach to improving test case prioritization: An
industrial case study, Software Maintenance, 27th
IEEE International Conference, ICSM, pp. 382-391.
Chidamber S.R. and Kemerer C.F., 1994. A Metrics Suite
for Object Oriented Design, IEEE Transactions on
Software Engineering, vol. 20, no. 6, pp. 476–493.
Dagpinar M., and Jahnke J., 2003. Predicting
maintainability with object-oriented metrics – an
empirical comparison, Proceedings of the 10th
Working Conference on Reverse Engineering
(WCRE), IEEE Computer Society, pp. 155–164.
Elbaum S., Rothermel G., Kanduri S. and Malishevsky
A.G., 2004. Selecting a cost-effective test case
prioritization technique, Software Quality Control,
12(3):185–210.
Gupta V., Aggarwal K.K. and Singh Y., 2005. A Fuzzy
Approach for Integrated Measure of Object-Oriented