Nociception in fruit fly (Drosophila melanogaster) larvae is characterized by a stereotyped escape behavior. When a larva encounters a noxious (potentially harmful) stimulus, it responds by curving its body into a c-shape and rolling in a corkscrew-like manner around its long-body axis. This rolling behavior may serve to quickly remove the larva from the source of the noxious stimulus, and is particularly adaptive to escape from a common natural predator of fruit fly larvae: parasitoid wasps (Leptopilina boulardi). L. boulardi completes its life cycle by using fruit fly larvae as hosts for its offspring. Female wasps sting fly larvae with an ovipositor and lay an egg within the larva. The wasp offspring hatches inside the fly larva, consumes the fly tissues during pupation, and eventually emerges from the pupal case as an adult wasp. Fruit fly larvae respond to oviposition attacks by rolling, which causes the long flexible ovipositor to be wound around the larval body like a spool. This dislodges the wasp and allows the larva to attempt to escape by crawling. Rolling behavior is triggered by the activation of sensory neurons (nociceptors) whose function can inform our understanding of the mechanisms of nociception. In this protocol, we describe a simple behavioral assay to test and measure nociceptive responses in Drosophila larvae during oviposition attacks by female parasitoid wasps. First, we discuss parasitoid wasp husbandry and culturing methods in the laboratory. We then describe how to perform the wasp nociception assay on third-instar fruit fly larvae.