11.3 A Metaphor for Test Activity

11.3 A Metaphor for Test Activity

A software system can be viewed as a set of program modules that are executing a set of mutually exclusive functionalities. If the system executes a functionality expressed by a subset of modules that are fault-free, it will not fail. If, on the other hand, the system is executing a functionality expressed in a subset of fault-laden modules, there is a very high probability that it will fail. Each test of the software will exercise particular functionalities that drive the system into regions of code (i.e., modules) of differing complexities (i.e., fault proneness).

Each software test will generally execute a subset of the total program functionality. As a result, the test will cause a subset of the program modules to execute. As each test is run to completion, we can accumulate the distribution of test activity in a test execution frequency vector (TEFV). Each element in this vector will represent the total number of times that a particular test has executed. From this vector we can generate a test execution profile for each test in the same manner as we developed the module profiles in Chapter 10.

Each test scenario will excise a subset of program modules for execution, depending on the test functionality. There will be a call graph for the tested modules that represents a sub-call graph of the entire program. The systematic transition between module pairs in this call graph can be modeled as a stochastic process, where we define an indexed collection of random variables {Xt}, where the index t runs through a set of nonnegative integers t = 0, 1, 2,... representing the epochs of the test process. At any particular epoch, the software is found to be executing exactly one of its M modules. The fact of the execution occurring in a particular module is a state of the system. For a given test case, the system will be executing exactly one of its M modules. In this representation of the system, there is a stochastic process {Xt} where the random variables are observed at epochs t = 0, 1, 2,... and where each random variable may take on any one of the M integers from the state space A = 1,2,...M. The probability that a particular module will execute depends entirely on the set of functionalities that each test in the test suite will exercise.

As a test plan is developed for a software system, a set of T individual test cases will be developed. Let Y be a random variable defined on the indices of the set of all test elements of T, the complete test suite for the software system. Then:

where k = 1,2,...,||T|| represents the execution profile for a set of modules that can execute during a particular test k. In other words, for each test ti, there is an execution profile represented by the profile .



Software Engineering Measurement
Software Engineering Measurement
ISBN: 0849315034
EAN: 2147483647
Year: 2003
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net