Congenital defects in dogs are caused from a variety of reasons. Som congeital defects, such as hip dysplasia and congenital heart defects, are more common in some dog breeds than others.
Genetic tests vary on what they are able to identify, and therefore how they can be used in managing genetic disease. Some tests measure the phenotype, or what can be seen in the animal. This may not directly relate to the genotype, or the genes regulating the defect.
Mating based on phenotype is called assortative mating. Mating like to like is positive assortative mating. Mating like to unlike (i.e., bringing a new trait in or correcting a fault) is negative assortative mating.