ISTQB-ATTA practice question 14 of 15
For the control flow, what is the correct labelling? 1 credit [K2] i ii iii
Full set: 65 questionsIn control flow analysis, a program's structure is represented as a control flow graph. This graph consists of three primary components. (i) represents Nodes, which are basic blocks of sequential code. (ii) represents a Link or an edge, which signifies a transfer of control or a "jump" from one node to another. (iii) represents a Region, which is an area enclosed by nodes and links. The number of regions is used in calculating the cyclomatic complexity of the graph, a key metric in white-box testing.
B. NodesRegionLink: This incorrectly identifies the link (edge) as a region and the region as a link. The arrow (ii) clearly depicts a path, not an area.
C. RegionLinkNodes: This incorrectly identifies the node (i) as a region and the region (iii) as a node. A node represents a block of code, not an enclosed area.
D. RegionNodesLink: This incorrectly identifies the node (i) as a region and the link (ii) as a node. A link represents the flow of control, not a code block.
1. ISTQB Advanced Level Technical Test Analyst Syllabus 2019 v1.1
Section 4.1.1
"Control Flow Analysis". The syllabus states: "Control flow is represented using a control flow graph
which consists of nodes and edges (links)... Cyclomatic complexity is a measure of the complexity of a component and is calculated from a control flow graph... It is equal to the number of regions in the graph." This confirms the use and definition of nodes
links (edges)
and regions.
2. Myers
G. J.
Sandler
C.
& Badgett
T. (2011). The Art of Software Testing (3rd ed.). John Wiley & Sons. Chapter 4
"White-Box Testing
" describes basis path testing using control flow graphs. It defines nodes as processing blocks
edges (links) as representing the flow of control
and discusses cyclomatic complexity (V(G) = E - N + 2)
which is equivalent to the number of regions in a planar graph.
3. Ammann
P.
& Offutt
J. (2016). Introduction to Software Testing (2nd ed.). Cambridge University Press. Chapter 2
"Graph Coverage
" provides formal definitions: "A graph G = (N
E) consists of a set of nodes N and a set of edges E... In control flow graphs
nodes represent statement lists and edges represent the flow of control." The concept of regions is fundamental to the graph theory upon which this analysis is based.
Keep practicing
Take the free ISTQB-ATTA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ISTQB-ATTA practice questions
- Question 3Which additional set of test cases is needed to achieve both 100% statement coverage and …
- Question 4How many test cases are needed to test code fragment lines 26 – 32 to achieve 100% condit…
- Question 6It has been suggested to organize a performance test to find out more regarding the third…
- Question 7To address reliability a number of measures will be taken throughout the development and …
- Question 8A developer has spent three days looking at a system that crashes now and then. The probl…
- Question 9Based on the state diagram above, how many test cases are needed to achieve 1-switch cove…
