Hard-To-Test Code

Definition:

  • Legacy software (any software that doesn’t have a complete suite of automated tests) can be hard to test since we are typically writing the tests “last” (after the software already exists.) If the design of the software is not conducive to automated testing, we may be forced to use Indirect Testing (see Obscure Test) via awkward interfaces that involve a lot of accidental complexity; that may result in Fragile Tests or a Fragile Fixture.

References:

Quality attributes

  • - Code Example

  • - Cause and Effect

  • - Frequency

  • - Refactoring