In this review we demonstrate the interaction of the blueprint of an individual (the genome, genomic DNA), its phenotype and the environment. The phenotype consists of quantitative (e.g. growth, milk yield) or functional characteristics e.g. fitness, longevity, fertility and disease resistance. The latter characteristics influence the welfare of an animal substantially. As only the genetically determined part of a particular characteristic is transferred from one generation to the next, it is important to know what the genetic variants (alleles) of the parents at one or more gene loci are. New methods in molecular biology have made it possible to localize and characterize important genes which help to breed more efficient and healthy animals. The exact characterization of the phenotype is vital in identifying genes with major effects and therefore the cooperation with experts from veterinary medicine, biochemistry, and biology is indispensable. As well as an overview of available genetic tests in farm animals, we show various examples how to identify the molecular basis of a particular phenotype and how to use the results in practical breeding programs. Genetic diagnosis enables the breeder to identify undesired alleles early and hinders therefore its uncontrolled distribution in the population. In the long term this leads to a smaller number of affected animals and depending on the disease it may help to prevent animals from suffering.