An egg-in-worm (EIW) assay is a useful method to quantify egg-laying behavior. Alterations in egg laying can be a behavioral response of the model organism Caenorhabditis elegans to potentially harmful environmental substances such as those produced by pathogenic bacteria.