Beyond writing code, AI assistants are increasingly useful for reviewing it and generating tests — two tasks that are tedious enough that developers often skimp on them. Used well, an assistant becomes a tireless first-pass reviewer that catches obvious problems and drafts the boilerplate of a test suite in seconds. Used carelessly, it lends false confidence to code nobody really checked. The line between the two is who stays responsible.
The productive framing: AI does the tedious first pass; you do the judgement that actually matters.
AI as a first-pass reviewer
Handing a diff to an assistant and asking "what could go wrong here?" often surfaces genuine issues quickly: unhandled edge cases, a missing null check, an obvious inefficiency, a variable name that misleads. It never gets tired, never rushes on a Friday, and will happily explain its reasoning. For catching the mechanical and the obvious, it is a strong complement to human review — a filter before a person spends their limited attention.
But it reviews without understanding your system's real intent, business rules or architecture, so it misses the issues that require that context — the subtly wrong logic that is syntactically fine, the change that breaks an unstated invariant three modules away. It catches the shallow; the deep is still yours.
AI for drafting tests
Generating tests is one of AI's most practical uses: point it at a function and it will draft cases for typical inputs, empty inputs, boundaries and error conditions far faster than you would type them. This is genuinely valuable for building out coverage and for the many tests that are more tedious than difficult.
The catch is a trap worth naming: AI-generated tests often assert that the code does what it currently does, not what it should do. If the code has a bug, the generated test may faithfully lock in the bug. Tests are a specification of correct behaviour, and only you know what correct is — so read every generated test and confirm it asserts the intended behaviour, not just the observed one.
Staying the final authority
The healthy pattern is delegation with oversight, exactly as you would treat a capable but context-blind junior colleague. Let the assistant flag issues and draft tests; then apply your understanding of the system to decide what matters, fix what it missed, and reject what it got wrong. The moment you paste its review conclusions or its tests without reading them, you have not saved work — you have hidden risk.
Approached this way, AI genuinely raises the floor: more code gets a first-pass review, more functions get a starting test suite, and the boring parts move faster. It does not raise the ceiling on its own — that still comes from an engineer who understands the system and refuses to outsource the final call. Use it to do more reviewing and testing, never to do less thinking.