CS FundamentalsHardGATE CS · TCS NQT Prime · Product Company SDE
A function contains 9 binary decision points (if/while/for conditions), and no other branching. Using V(G) = (number of decision points) + 1, how many independent paths (and thus how many test cases for 100% branch coverage via basis-path testing) does it need?
- A. 11
- B. 10
- C. 8
- D. 9
Correct answer: B. 10
V(G) = 9 + 1 = 10; this is also the minimum number of test cases for full branch coverage by basis-path testing.
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
- What does git rebase do differently from git merge when integrating a feature branch onto main?
- Why might a team deliberately choose NOT to use story points and instead estimate tasks directly in hours?
- For a embedded mode project with Basic COCOMO effort E = 131.1 person-months, the development time formula is D = 2.5 × E^0.32 months…
- A mutation test run generated 40 mutants. 6 are equivalent mutants and 28 were killed. What is the mutation score, excluding equivalent…
- Why does depending on abstractions (interfaces) rather than concrete classes, as the Dependency Inversion Principle recommends, make unit…
- A deployment strategy routes 100% of production traffic to a brand-new environment all at once, after it has been fully tested in…