Use a Naming Convention

I almost omitted this. After all, everyone knows to use a naming convention, right? And everyone knows the benefits in terms of self-documenting code, maintainability, expression of intent, and so forth.

Then I remembered all the code bases I have seen with tests that have meaningless names such as test1 and test2, incomplete conventions such as testMethod indicating that this is a test of method but not telling what aspect of the method is being tested, and inconsistent conventions. So here goes.

Use a convention. Use your convention consistently. Make sure your convention captures everything that needs to be captured. Seriously consider using industry-standard conventions, whether explicit or de facto standards, if they ...

Get Quality Code: Software Testing Principles, Practices, and Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.