An application of graph theory to software test data selection

  • Authors:
  • M. E. Stickney

  • Affiliations:
  • -

  • Venue:
  • Proceedings of the software quality assurance workshop on Functional and performance issues
  • Year:
  • 1978

Quantified Score

Hi-index 0.00

Visualization

Abstract

Graph theory is playing an increasingly important role in the design, analysis, and testing of computer programs. It's importance is derived from the fact that flow of control and flow of data for any program can be expressed in terms of directed graphs. From the graph representing the flow of control, called the program graph, many others can be derived that either partially or completely preserve the program control structure. One derived graph known as a cyclomatic tree is of particular value in program testing. It is so named because the number of leaves of the tree is equal to the cyclomatic number of the program graph. A thorough treatment of cyclomatic numbers is provided in [3]. A program called the Complexity/Path Analyzer (CPA) has been developed that builds and utilizes a program cyclomatic tree to provide test planning information, automatically place software counters called probes as discussed in [9] and [10] in a program, and provide selected parameters such as program length and program graph cyclomatic number. The paper discusses the features and derivation of cyclomatic trees as well as their value and application to testing and test data generation. A cyclomatic tree provides a test planner with information useful for planning program tests. In particular, it furnishes test data selection criteria for developing tests that are minimally thorough as defined by Huang in [9]. A test data selection criterion will be defined as minimally thorough if any complete test with respect to the criterion is at least minimally thorough. The term complete is used as defined by Goodenhough and Gerhart in [13]. A test is defined to be a non empty sequence of test cases. Each test case consists of an element selected from the input domain of the program being tested. The paper discusses the merits of one particular technique selected to achieve a minimally thorough test data selection criteria. Part of the technique is automated by the CPA program.