O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required