CS FundamentalsHardProduct-company placement

A team adds hundreds of snapshot tests that compare whole rendered pages with stored output. Six months later, which problem is most typical?

  1. A. Many small intended changes break many snapshots, so developers update them in bulk without reading the diffs, letting real regressions through
  2. B. They cannot detect any regressions
  3. C. They make the code impossible to refactor because they test private methods
  4. D. They only run on the developer's machine

Correct answer: A. Many small intended changes break many snapshots, so developers update them in bulk without reading the diffs, letting real regressions through

Snapshot tests assert on a lot of incidental output, so they fail on harmless changes. Reviewers then approve regenerated snapshots wholesale and the tests stop guarding anything. Focused assertions on the behaviour that matters avoid this.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic