Drosophila melanogaster genetics provides the advantage of molecularly defined P-element insertions and deletions that span the entire genome. Although Drosophila has been extensively used as a model system to study heart development, it has not been used to dissect the genetics of adult human heart disease because of an inability to phenotype the adult fly heart in vivo. Here we report the development of a strategy to measure cardiac function in awake adult Drosophila that opens the field of Drosophila genetics to the study of human dilated cardiomyopathies. Through the application of optical coherence tomography, we accurately distinguish between normal and abnormal cardiac function based on measurements of internal cardiac chamber dimensions in vivo. Normal Drosophila have a fractional shortening of 87 +/- 4%, whereas cardiomyopathic flies that contain a mutation in troponin I or tropomyosin show severe impairment of systolic function. To determine whether the fly can be used as a model system to recapitulate human dilated cardiomyopathy, we generated transgenic Drosophila with inducible cardiac expression of a mutant of human delta-sarcoglycan (deltasg(S151A)), which has previously been associated with familial dilated cardiomyopathy. Compared to transgenic flies overexpressing wild-type deltasg, or the standard laboratory strain w(1118), Drosophila expressing deltasg(S151A) developed marked impairment of systolic function and significantly enlarged cardiac chambers. These data illustrate the utility of Drosophila as a model system to study dilated cardiomyopathy and the applicability of the vast genetic resources available in Drosophila to systematically study the genetic mechanisms responsible for human cardiac disease.