HOME

TheInfoList



OR:

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 A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving a task. The flowchart shows the steps as boxes of va ...
) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths.


Definition

In Huang's 1975 paper, 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 A path is a route for physical travel – see Trail. Path or PATH may also refer to: Physical paths of different types * Bicycle path * Bridle path, used by people on horseback * Course (navigation), the intended path of a vehicle * Desire p ...
in a program's
flowchart A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving a task. The flowchart shows the steps as boxes of va ...
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 parenthesis): # It consists of a single node with in-degree = 0 (initial node) # It consists of a single node with out-degree = 0 (terminal node) # It consists of a single node with in-degree ≥ 2 or out-degree ≥ 2 (decision/merge points) # It consists of a single node with in-degree = 1 and out-degree = 1 # It is a maximal chain of length ≥ 1. According to Jorgensen (2013), in Great Britain and
ISTQB The International Software Testing Qualifications Board (ISTQB) is a software testing certification board that operates internationally. Founded in Edinburgh in November 2002, the ISTQB is a non-profit association legally registered in Belgium. I ...
literature, the same notion is called
linear code sequence and jump Linear code sequence and jump (LCSAJ), in the broad sense, is a software analysis method used to identify structural units in code under test. Its primary use is with dynamic software analysis to help answer the question "How much testing is enough ...
(LCSAJ).


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. DD-path testing is also called C2 testing or branch coverage.


See also

*
Basic block In compiler construction, a basic block is a straight-line code sequence with no branches in except to the entry and no branches out except at the exit. This restricted form makes a basic block highly amenable to analysis. Compilers usually decom ...
*
Basis path testing In software engineering, basis path testing, or structured testing, is a white box method for designing test cases. The method analyzes the control-flow graph of a program to find a set of linearly independent paths of execution. The method normall ...
and its ancillary articles **
Cyclomatic complexity Cyclomatic complexity is a software metric used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program's source code. It was developed by Thomas J. McCabe, Sr. in 1976 ...
**
Essential complexity Essential complexity is a numerical measure defined by Thomas J. McCabe, Sr., in his highly cited, 1976 paper better known for introducing cyclomatic complexity. McCabe defined essential complexity as the cyclomatic complexity of the reduced CFG ( ...
*
Code coverage In computer science, test coverage is a percentage measure of the degree to which the source code of a program is executed when a particular test suite is run. A program with high test coverage has more of its source code executed during testing, ...
*
White-box testing White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality ...


References


External links

* http://www.eecs.yorku.ca/course_archive/2011-12/W/4313/slides/11-Paths.pdf Software testing {{Soft-eng-stub