The only test that can hurt is laparoscopy, which is a surgical procedure. General anesthesia is used, so the patient will be sedated during the procedure and will not notice anything, but when the anesthesia wears off you may notice pain, so you may need analgesics.
The pain usually derives from the distension of the abdomen with gas, which may have irritated some nerve. This distension is necessary to lift the abdominal wall so that the surgeon can work. The pain disappears in a few hours or at most 2-3 days.