The Stepford Fields

Definition:

  • Where (too) many of the fields in test contain the same value, making it hard to spot when a calculation is reading a value from the wrong field, because it works on the test data; this also makes load testing near a cache pretty meaningless

Code Example:

name:
 title: Mr
 first: Testing
 last: Testing
company: Testing
expect(person.getFullName())
  .toBe('Mr Testing Testing');
expect(person.getCompanyName())
    .toBe('Testing');

person.company = 'Testing';

expect(person.getCompanyName())
  .toBe('Testing');

References:

Quality attributes

  • - Code Example

  • - Cause and Effect

  • - Frequency

  • - Refactoring