Off-by-one Error
// Definition
A logic error where a loop, index, or boundary check is off by exactly one — iterating one too many or too few times, or including/excluding a value at the edge of a range. Common causes include using < instead of <=, starting a loop at index 1 instead of 0, or miscalculating array bounds. Boundary value analysis targets off-by-one errors directly by testing the values immediately at and on either side of every boundary.
// Related terms
Boundary Value Analysis
Testing values immediately at and around boundaries (e.g., min, max, just-below, just-above). Bugs cluster at edges — this technique catches off-by-one errors that equivalence partitioning alone misses.
Equivalence Partitioning
Dividing the input space into groups where the system should behave identically, then testing one representative value per group. Reduces redundant test cases dramatically without losing coverage.
Defect
A flaw in a software system that causes it to behave in an unintended or incorrect way — also called a bug or fault. A defect arises when actual behaviour diverges from expected behaviour defined by requirements or specification. In QA workflow, a defect is formally logged with reproduction steps, severity, and priority, then tracked through the bug lifecycle from discovery to verified closure. The distinction that matters in practice: an error is the human mistake, a fault is the resulting code flaw, and a failure is the observable incorrect behaviour at runtime.