Echocardiography This test uses sound waves to create a picture of the heart. An echocardiogram test can be used in the diagnosis of a number of heart conditions, including: valve disorders cardiomyopathy congestive heart failure enlarged heart heart attack