The ease with which a software component can be tested is an important element in determining the amount of effort required to build that component. The aggregation of the testing efforts for all of the classes has a major impact on the overall effort required to build a software system. The goals of our metrics research have been expanded from quantifying the construction process by considering the design complexity of individual classes[20][12][1]to quantifying project attributes by using metrics[17]. In this paper we present early results from our work on estimating the amount of effort that will be required to test an object-oriented software system.
Software metrics are quantitative values that provide information for decision making. Metrics are used to quantify attributes of the product being developed and of the process used to construct the product. These measurements can be used to estimate the effort, size and cost requirements for the development of a software system.
Given an iterative, incremental process model, repeated applications of a metric can provide an opportunity to recognize trends that can be used to predict the progress, or lack thereof, of the project. This technique provides an opportunity to identify problems early in the developmental cycle. Project attributes are therefore observed/estimated as early as in the analysis phase, even though there is a risk of reduced accuracy[15].
The main focus of this research has been to estimate, as early as possible in the development process, the effort that is needed to test a class. We have investigated the testability of a method in a class and use that measure to indirectly estimate the effort that is needed to test a class. We introduce a concept termed the visibility component of a method. It is a measure of the accessibility of information that must be inspected to evaluate the correctness of the execution of a method.
We show that the testability of the method is a function of its visiblity component. The estimation of a class's testability given the testability of its methods is also presented. The metric appropriately handles features in object-oriented languages such as the visibility of inherited attributes and other language features such as exception handling.
This paper makes four main contributions:
The remainder of the paper is organized as follows. In the next section, we review the background and related work necessary to understand the metric. In section 3, we define a set of basic terms used in the description of the metric and define the metric itself. In section 5, we consider our metric in the context of criteria that have been widely used for evaluating complexity metrics and we present an experimental validation of the metric as well. In section 4, we present a set of examples to illustrate the computation of the metric. Finally in section 6, we present conclusions and directions for future work.