BDD & TDD / Scenario
The Coverage Mirage
A repo claims TDD and 96% coverage. The commit log, one assertion-free test, and a wall of mock-verifies say otherwise. Audit it.
- Difficulty
- Hard
- Format
- Scenario
- Points
- 200
- Estimate
- 14 min
// MISSION BRIEF
Your Mission
Your team inherited a service whose README says "built with TDD, 96% line coverage". Regressions still ship weekly. You pull the history and a sample test file. Judge what the evidence actually proves.
Scoring: weighted decisions; the core diagnosis counts double.
// FIRST CONTACT
Battle teaser
First artifact
git log --oneline (excerpt)
What does the commit history tell you, and why does it matter?
- ATests were written a day after the implementation; test-after tests tend to mirror the code and pass by construction, locking in existing bugs as the spec
- BThe team squashed commits, which is the real problem
- CNothing; commit order never reflects how code was written
- DTDD was followed because tests exist at all
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
tddcoveragemockstest-quality