Decision-to-decision path
A decision-to-decision path, or DD-path, is a path of execution 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, a decision-to-decision path is defined as path in a program's flowchart such that all the following hold :- 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
- initial and terminal nodes are distinct, and
- all interior nodes have in-degree = 1 and out-degree = 1.
A DD-path is a set of nodes in a program graph such that one of the following holds :
- It consists of a single node with in-degree = 0
- It consists of a single node with out-degree = 0
- It consists of a single node with in-degree ≥ 2 or out-degree ≥ 2
- It consists of a single node with in-degree = 1 and out-degree = 1
- It is a maximal chain of length ≥ 1.
Properties
From the latter definition 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.