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?
- A. Many small intended changes break many snapshots, so developers update them in bulk without reading the diffs, letting real regressions through
- B. They cannot detect any regressions
- C. They make the code impossible to refactor because they test private methods
- 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.
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 coverage-guided fuzzer runs a parser for hours with random mutations of seed inputs, and AddressSanitizer is enabled. What can it find…
- After a production outage a team draws a diagram with the problem at the head and branches for People, Process, Tools, Environment and…
- In a RACI matrix for a release task, which rule is standard?
- COCOMO II computes Effort = 2.94 × Size^E × EAF person-months, with E = 0.91 + 0.01 × (sum of scale factors). For a 40 KSLOC project with…
- A project is behind schedule. The manager can either add people to critical-path activities or start some critical activities in parallel…
- Critical chain project management removes the safety margin from each task estimate and pools it into a project buffer at the end. Which…