CS FundamentalsHardAccenture · Tech Mahindra pattern
A program's control flow graph has 8 edges, 6 nodes and 1 connected component. According to McCabe's basis path method, what is the minimum number of test cases needed to execute every independent path at least once?
- A. 8
- B. 4
- C. 5
- D. 3
Correct answer: B. 4
The size of the basis set of independent paths equals the cyclomatic complexity: V(G) = E − N + 2P = 8 − 6 + 2(1) = 4. That many test cases form a minimal basis set.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A Scrum team's last 3 sprints delivered 24, 28, 26 story points. 234 points remain in the backlog and sprints are 2 weeks long. Using…
- A Scrum team's last 4 sprints delivered 18, 22, 20, 24 story points. 168 points remain in the backlog and sprints are 2 weeks long. Using…
- A Scrum team's last 3 sprints delivered 35, 40, 30 story points. 315 points remain in the backlog and sprints are 3 weeks long. Using…
- A Scrum team's last 3 sprints delivered 15, 18, 21 story points. 108 points remain in the backlog and sprints are 2 weeks long. Using…
- A Scrum team's last 4 sprints delivered 50, 45, 55, 40 story points. 380 points remain in the backlog and sprints are 1 week long. Using…
- A Scrum team's last 3 sprints delivered 12, 16, 14 story points. 126 points remain in the backlog and sprints are 2 weeks long. Using…