When the heart muscle is harmed, the protein troponin is released into the bloodstream. The troponin test measures the level of troponin in the blood to detect heart damage. This test is used to diagnose heart attacks and other conditions that can cause heart muscle damage.