Decision-to-decision path

A decision-to-decision path, or DD-path, is a path of execution (usually through a flow graph representing a program, such as a flow chart) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths.

File:DD-Path.svg

Definition

In Huang's 1975 paper,{{cite journal|last=Huang|first=J.C.|title=An Approach to Program Testing|journal=Computing Surveys|date=September 1975|volume=7|issue=3|pages=118–119|doi=10.1145/356651.356652}}

The definition given there is citing: "Fortran automated verification system Level 1 — user's guide, Program Validation Project, General Research Corp., October 1974." a decision-to-decision path is defined as path in a program's flowchart such that all the following hold (quoting from the paper):

  • its first constituent edge emanates either from an entry node or a decision box;
  • its last constituent edge terminates either at a decision box or at an exit node; and
  • there are no decision boxes on the path except those at both ends

Jorgensen's more recent textbooks restate it in terms of a program's flow graph (called a "program graph" in that textbook). First define some preliminary notions: chain and a maximal chain. A chain is defined as a path in which:

  • initial and terminal nodes are distinct, and
  • all interior nodes have in-degree = 1 and out-degree = 1.

A maximal chain is a chain that is not part of a bigger chain.

A DD-path is a set of nodes in a program graph such that one of the following holds (quoting and keeping Jorgensen's numbering, with comments added in parentheses):

  1. It consists of a single node with in-degree = 0 (initial node)
  2. It consists of a single node with out-degree = 0 (terminal node)
  3. It consists of a single node with in-degree ≥ 2 or out-degree ≥ 2 (decision/merge points)
  4. It consists of a single node with in-degree = 1 and out-degree = 1
  5. It is a maximal chain of length ≥ 1.

According to Jorgensen (2013), in Great Britain and ISTQB literature, the same notion is called linear code sequence and jump (LCSAJ).{{dubious|date=July 2014}}

Properties

From the latter definition (of Jorgensen) we can conclude the following:

  • Every node on a flow graph of a program belongs to one DD-path.
  • If the first node on a DD-path is traversed, then all other nodes on that path will also be traversed.
  • The DD path graph is used to find independent path for testing.
  • Every statement in the program has been executed at least once.

DD-path testing

According to Jorgensen's 2013 textbook, DD-path testing is the best known code-based testing method, incorporated in numerous commercial tools.{{cite book|author=Paul C. Jorgensen|title=Software Testing: A Craftsman's Approach, Fourth Edition|year=2013|publisher=CRC Press|isbn=978-1-4665-6068-0|pages=136–137}}

DD-path testing is also called C2 testing or branch coverage.{{cite book|author1=Judith A. Clapp|author2=Saul F. Stanten|author3=W.W. Peng |author4=D.R. Wallace |author5=Deborah A. Cerino |author6=Roger J. Dziegiel Jr. |title=Software Quality Control, Error, Analysis|year=1995|publisher=William Andrew|isbn=978-1-4377-4484-2|pages=347–348}}{{cite book|author=J. C. Huang|title=Software Error Detection through Testing and Analysis|url=https://archive.org/details/softwareerrordet00huan|url-access=limited|year=2009|publisher=John Wiley & Sons|isbn=978-0-470-46405-2|pages=[https://archive.org/details/softwareerrordet00huan/page/n175 164]–165}}

See also

References

{{Reflist}}