CS FundamentalsHardGATE CS · TCS NQT Prime · Product Company SDE

What is the difference between 'verification' performed via a static code review (e.g. a peer reading the diff) and verification performed via automated testing?

  1. A. Code review always finds more bugs than automated testing in every case
  2. B. Automated testing can review code style but never actual behaviour
  3. C. They are functionally identical activities with no difference
  4. D. A code review can catch design issues, readability problems and some logic errors through human judgement before execution, while automated tests verify actual run-time behaviour against expected results; they are complementary, not interchangeable

Correct answer: D. A code review can catch design issues, readability problems and some logic errors through human judgement before execution, while automated tests verify actual run-time behaviour against expected results; they are complementary, not interchangeable

Static review relies on human reasoning about the code without running it, catching things like poor design or unclear logic; automated tests instead exercise the code's actual run-time behaviour, so good practice uses both together.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic