Combine Duplication
Learn about the three kinds of duplications in tests.
We'll cover the following
We need to look out for three kinds of duplication:
-
Duplication of fact
-
Duplication of logic
-
Duplication of structure
Duplication of fact
Duplication of fact is usually easy to see and fix. A common case is a “magic number” used by multiple parts of the code, such as a conversion factor or a maximum value. We saw this in an earlier example with the 21
days we used to calculate velocity. Another common example is a status variable that has only a few valid values, and the list of those values is duplicated:
Get hands-on with 1400+ tech skills courses.