Drosophila melanogaster are useful in studying genetic or environmental manipulations that affect behaviors such as spontaneous locomotor activity. Here we describe a protocol that utilizes monitors with infrared beams and data analysis software to quantify spontaneous locomotor activity.