Automatic generation of basis set of paths for white box unit testing
Date
2010
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Department of Computer Science and Information Technology
Abstract
Software testing is defined as the process of executing the program with the intent of finding an error that ensures the correctness, completeness and quality of the developed software. Black-box and white-box testing are the two major techniques for software testing. In black-box testing, no information about the internal structure of the program under testing is available. However, in white-box testing, a complete source code or the internal structure is available.
Unit testing of conventional or object-oriented software makes heavy use of white-box testing techniques, specifically basis path testing. Basis path testing is a white-box testing technique that uses a Control Flow Graph (CFG) of a program under test to generate a basis set of independent paths .Different techniques have been proposed in this thesis to generate basis set of independent paths.
In this thesis, we implemented an algorithm to develop a software tool that performs the following three tasks:
• Constructs a control flow graph of a given program based on the pseudocode.
• Computes the cyclomatic complexity of the control flow graph.
• Generates a basis set of independent paths of the control flow graph.
Experiments on our tool show that the algorithms implemented for control flow graph construction, computation of cyclomatic complexity and generation of basis set of independent paths for a program under test gives acceptable results and yield results in a reasonable time. It has been observed that the algorithm implemented in our program generates a basis set of paths for a given control flow graph in O (max (n, e)) time complexity where n is the number of nodes and e is the number of edges in the control flow graph.
Description
Keywords
Software testing, Code inspection