Electrocardiogram (ECG or EKG) to assess the heart rate and rhythm. This test can often detect heart disease, heart attack, an enlarged heart, or abnormal heart rhythms that may cause heart failure.