Abstract—Testing accounts for the major percentage of technical contribution in the software development process. Typically, it consumes more than 50 percent of the total cost of developing a piece of software. The selection of software tests is a very important activity within this process to ensure the software reliability requirements are met. Generally tests are run to achieve maximum coverage of the software code and very little attention is given to the achieved reliability of the software. Using an existing methodology, this paper describes how to use Bayesian Belief Networks (BBNs) to select unit tests based on their contribution to the reliability of the module under consideration. In particular the work examines how the approach can enhance test-first development by assessing the quality of test suites resulting from this development methodology and providing insight into additional tests that can significantly reduce the achieved reliability. In this way the method can produce an optimal selection of inputs and the order in which the tests are executed to maximize the software reliability. To illustrate this approach, a belief network is constructed for a modern software system incorporating the expert opinion, expressed through probabilities of the relative quality of the elements of the software, and the potential effectiveness of the software tests. The steps involved in constructing the Bayesian Network are explained as is a method to allow for the test suite resulting from test-driven development. Keywords—Software testing, Test Driven Development, Bayesian Belief Networks. I. INTRODUCTION ECENT research by Wooff et al [1, 2, 3, 4] introduces the use of Bayesian Belief Networks (BBNs) or Bayesian graphical models to aid software testers, developers and managers in the selection and ordering of software tests. BBN’s are a probabilistic framework that can combine the software system structure with the expert opinion to select tests to achieve the required level of reliability at system, subsystem or even module level. Manuscript received January 25, 2006. (Write the date on which you submitted your paper for review.) This work was supported by DKIT as apart of HETAC strand I project. Vijaya Periaswamy.S., a master’s research student of Department of Computing and Mathematics, Dundalk Institute of Technology, Dundalk, Republic of Ireland (phone: +353 429370563; e-mail: Vijaya.Periaswamy@dkit.ie). Kevin McDaid is a Lecturer of Department of Computing and Mathematics, Dundalk Institute of Technology, Dundalk, Republic of Ireland. (e-mail: Kevin.McDaid@dkit.ie). With the assistance of a major international company, Wooff et al have trialed the approach on a number of systems. This research is built on their work but goes beyond existing work by investigating, through a real software project, whether this approach can be applied to a system developed using a test-driven development (TDD) methodology. The paper is structured as follows. Section II describes the methodology pioneered by Wooff et al to use BBNs to assess the quality of tests based on their contribution to the reliability of the software system. Section III discusses the application of the methodology within the test driven development scenario. Section IV illustrates our work through a case study that applies the approach to an existing system. W explain how the resulting model may be used to assess the quality of the tests that are generated through TDD and to propose supporting tests that can contribute to a significant reduction in the remaining reliability of the module examined. Section V concludes the work. This paper presents some early results from a study whose broader objective is to research the application of the BBN methodology to systems developed using test-driven development. II. BAYESIAN BELIEF NETWORKS The theory of BBNs, developed over the last two decades, has, through the availability of good computing facilities, become an increasingly powerful tool for the solution of complex decision problems where a large number of factors contributing to overall uncertainty [5]. A BBN is a network of nodes connected by directed links with a probability function attached to each node. The nodes represent uncertain variables and arcs represent the casual relationships between the variables. The probability tables for each node provide the probabilities of each state of the variable represented by that node. Nodes without parents require marginal probabilities while for the nodes with parents, these are conditional probabilities for each combination of parent state values [6]. In effect, if there is a directed link from one node (parent) to another (child) in a BN then the probability of the child is evaluated conditionally on the values of the node from which the link originates [7]. Sections II and IV describe a particular BBN in more detail. In general, the network is characterized by providing a formal framework for the combination of data which, in our Bayesian Belief Networks for Test Driven Development Vijayalakshmy Periaswamy S., and Kevin McDaid R World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:1, No:11, 2007 3709 International Scholarly and Scientific Research & Innovation 1(11) 2007 scholar.waset.org/1307-6892/817 International Science Index, Computer and Information Engineering Vol:1, No:11, 2007 waset.org/Publication/817