Table of Contents
Advances in Software Engineering
Volume 2012 (2012), Article ID 964064, 13 pages
http://dx.doi.org/10.1155/2012/964064
Research Article

Evaluating the Effect of Control Flow on the Unit Testing Effort of Classes: An Empirical Analysis

Software Engineering Research Laboratory, Department of Mathematics and Computer Science, University of Quebec at Trois-Rivières, Trois-Rivières, QC, Canada G9A 5H7

Received 25 November 2011; Revised 18 March 2012; Accepted 28 March 2012

Academic Editor: Filippo Lanubile

Copyright © 2012 Mourad Badri and Fadel Toure. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

The aim of this paper is to evaluate empirically the relationship between a new metric (Quality Assurance Indicator—Qi) and testability of classes in object-oriented systems. The Qi metric captures the distribution of the control flow in a system. We addressed testability from the perspective of unit testing effort. We collected data from five open source Java software systems for which JUnit test cases exist. To capture the testing effort of classes, we used different metrics to quantify the corresponding JUnit test cases. Classes were classified, according to the required testing effort, in two categories: high and low. In order to evaluate the capability of the Qi metric to predict testability of classes, we used the univariate logistic regression method. The performance of the predicted model was evaluated using Receiver Operating Characteristic (ROC) analysis. The results indicate that the univariate model based on the Qi metric is able to accurately predict the unit testing effort of classes.