An echocardiogram is another test that measures the structure and function of the heart. The health care provider analyzes images of the heart function on a screen. The echocardiogram is also typically painless.