An important element in ensuring the quality of finished parts is nondestructive testing (NDT). NDT is the inspection of material or parts without impairing their future usefulness.
Every NDT method involves putting some kind of energy into the test material, and observing how that energy is affected by the part. In general, defects affect the energy differently than good material.