Here, we present a protocol to quantify the avoidance of stressed individuals. This paradigm is powerful yet user-friendly and can be used to assess the influence of genes and environment on one kind of social interaction in Drosophila melanogaster.