Recently, we have seen multiple transient unit test failures. While fixing
those issues, I realized that one of the problems that led to this
situation is that we haven't been treating unit tests in the same way as
the rest of the code. I found myself guilty of this too. When reviewing
patches, I tend to pay more attention to the main code than the testing
code.

Unit tests is an important part of our code base. If done correctly, they
expose real issues early and improve our code quality in the long run.
Going forward, it would be great if both the developers and the reviewers
could keep this in mind---tests are our code as well. So, all the good
things that we have been doing on the code (e.g., informative comments,
avoiding duplication, etc) should be done on the tests too.

Thanks,

Jun

Reply via email to