Test-driven code review refers to code reviews in which tests are reviewed first. Thus the difference to ad-hoc code reviewing is mainly the order in which files, functions and methods are examined.
One of the first mentions of test-driven code review was on Google’s testing blog. Since then, the idea of reading tests first during code reviews has also been empirically validated.
This article covers the following topics:
- Use Test-driven reviews to find more bugs
- Fewer maintainability issues are reported
- Benefits of reviewing tests standalone
- Tests are perceived as less important
- The value of high-quality test suites
- How to perform a test-driven code review?
- Code example: Calculator
- Reviewing calculator in a test-driven way
- Variation of test-driven code reviews
- Lessons learned: Review order matters and review intent is key
Are you ready to learn more? Then sign-up, or log-in: It’s free.