Bad Naming

Definition:

  • When a test fails, or when the test base requires maintenance, the test names are the first thing developers will generally attempt to understand before they apply changes to the test or the code being tested. If test names are poor quality, developers will need to spend time reading the code and determining how the test’s actual behavior is related to its name

Code Example:

function calculateSomething() {
  // ...
}

function calculateSomethingElse() {
  // ...
}

References:

Quality attributes

  • - Code Example

  • - Cause and Effect

  • - Frequency

  • - Refactoring