CS FundamentalsVery hardGATE CS · TCS NQT Prime · Product Company SDE
A build pipeline fails a merge if the newly added code's test coverage for that specific change falls below a configured threshold ('coverage gate on the diff', not on the whole codebase). What is the main motivation for scoping the gate to just the diff?
- A. It guarantees that the whole codebase will eventually reach 100% coverage automatically
- B. It disables testing entirely for any files that were not changed
- C. It lets a team enforce good testing habits on new code going forward without being blocked by a legacy codebase's pre-existing low overall coverage
- D. It is functionally identical to gating on total repository coverage
Correct answer: C. It lets a team enforce good testing habits on new code going forward without being blocked by a legacy codebase's pre-existing low overall coverage
Gating on just the changed lines lets teams hold new code to a higher testing standard immediately, without first needing to retroactively write tests for an entire pre-existing codebase before any merge could succeed.
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
- In Kanban's 'cumulative flow diagram', a widening band for a particular stage over time most directly indicates:
- A control-flow graph has 22 edges, 16 nodes and 1 connected component. Using V(G) = E − N + 2P, what is its cyclomatic complexity?
- A Scrum team completed 37, 16, 17 story points in its last 3 sprints. The remaining backlog is 140 points. Using average velocity, how…
- Why is 'testing in production' (e.g. canary releases combined with real monitoring) increasingly used alongside, not instead of…
- Why do many Agile teams deliberately re-estimate story points for a backlog item as more is learned about it, rather than treating the…
- Exploratory testing is best characterised as: