Naming conventions for test methods
One standard that is usually followed loosely is naming conventions. But it is still important to put some standards in place to reduce the maintenance of the overall test classes. In this section, we will briefly set standards for naming test classes, data files, methods, setup, cleanup, groups, and row ID parameters.
Test classes and data files
We covered file naming conventions earlier, but to refresh the naming convention for test classes, it should be something like FunctionalAreaTest.java
. The Test
 suffix tells the user that this is a test class and not a Java utility class.
Since we are using JSON as the data file format, each test class should have a corresponding data file minus the Test
suffix; so in this case, FunctionalArea.json
.
So, in the example test class we are building in this chapter, the class is called RockBandsTest.java
and the data file is called RockBands.json
. We will build onto that class as we define each section of it.