What to look for in a Code Review: Tests | Upsource Blog
There are many advantages to performing a code review, no matter how you approach the process in your organisation. It's possible to use code reviews to find potential problems with the code before it is integrated into the main code base, while it's still inexpensive to fix and the context is still in the developer's head.
As a code reviewer, you should be checking that the original developer has put some thought into the ways his or her code could be used, under which conditions it might break, and dealt with edge cases, possibly "documenting" the expected behaviour (both under normal use and exceptional circumstances) with automated tests.
If the reviewer looks for the existence of tests and checks the correctness of the tests, as a team you can have pretty high confidence that the code works. Moreover, if these tests are run regularly in a CI environment, you can see that the code continues to work – they provide automated regression checking. If code reviewers place a high value on having good quality tests for the code they are reviewing, the value of this code review continues long after the reviewer presses the "Accept" button.
Read full article from What to look for in a Code Review: Tests | Upsource Blog
No comments:
Post a Comment