We provide a detailed protocol for a Drosophila melanogaster foraging path-length assay. We discuss the preparation and handling of test animals, how to perform the assay and analyze the data.