A dominant trait can be shown both when an organism is homozygous dominant AND heterozygous. Two different genotypes give the same visible result so a testcross is needed to be able to accurately say if the organism is homozygous dominant or heterozygous