The only certain way of screening for endometriosis is surgery—specifically, a laparoscopy, in which case the surgeon will inflate the abdomen with a harmless gas, make a small cut, and insert a lighted camera to inspect the reproductive organs and intestines for endometrial tissue. The surgeon can then remove some of that tissue and perform a biopsy.
However, other, more preliminary tests for endometriosis that do not involve surgery can be performed. These include an MRI or ultrasound, which allow doctors to use magnets and high-frequency sound waves, respectively, to form an image of the abdominal cavity. Your doctor will likely only order a laparoscopy after first learning your complete medical history, and performing a physical and pelvic exam.