Saved in this browser - sign in to keep your review list.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Keep going - a few more words and AI can grade it.
Interview lens
How interviewers actually use this question
Likely follow-ups
Why does it matter that the test fails for the right reason before the agent writes any code?A test that fails on a typo or missing import, or already passes, proves nothing. The failure should point at the missing behavior.
The agent keeps changing tests to get to green. How do you prevent that in practice?Name a real control, like read-only test files, CI that flags test diffs, or approval for test edits, and why a prompt instruction alone is not enough.
The suite is green but you still don't trust the change. What else do you check?Tests prove only the cases written. Read the diff, look for untested paths, run broader integration and security checks, and consider property-based tests.
What you can say
TDD gives the agent an executable contract and a short feedback loop, so each piece of delegated work stays narrow and easy to check.
I start by reviewing a test for one required behavior and running it to confirm it fails for the right reason, not because of a typo or a missing import.
Then I ask the agent for the smallest implementation that makes it pass. It can't edit the tests without my approval, so it can't weaken the contract.
Once it passes, I add boundaries, invalid inputs and failure paths, rerun the focused checks, read the implementation, and move on to the next behavior.
The limit is that a green suite only proves the cases I specified, so I still review the code and run broader verification before I trust it.
Weak answers to avoid
Lets the agent write both tests and codeThen the tests check what the code does, not what you need. Say you review each test first and confirm it fails for the right reason.
Treats a green suite as proof of correctnessTests prove only the cases written. A strong answer adds code review, edge and failure cases, and verification beyond the suite.
Ignores the agent editing tests to passAn agent can weaken or delete assertions to reach green. Say how you block unapproved test edits and check test diffs in review.
Recites TDD with no link to agentsReciting red-green-refactor misses the question. Tie each step to delegation: small scope per test, fast feedback for the agent, easy human inspection.
Interview lens
Likely follow-ups, what you can say, and the weak answers to avoid.