Techniques for testing integrity of various elements of implantable medical device systems are described. Some embodiments automatically test the integrity of one or more system elements in response to detecting an event. Examples of events in response to which an integrity test may be performed include the patient being within a target activity state, a symptomatic event experienced by a patient, an external impact on the patient that exceeds a damage threshold, or an indication that the patient is receiving inappropriate therapy. Some embodiments automatically test integrity in response to failure to autonomously detect an event, which may be indicated by input from a patient. An implantable lead carrying electrodes or a therapeutic substance delivery element, such as a catheter, are examples of system elements for which integrity may be tested in some embodiments.