Whats the test they do to find out if you have ovarian cancer and how do you get it?

It depends. Pain and bloating can be signs of ovarian cancer, but they can be just from a painful period. Ovarian cancer would be more likely in older women, like 40+ years, and most likely in women 70+ years. Other tests, like pelvic exam, ca-125, and transvaginal ultrasound would be needed. The ultimate way to know is surgery to see if it is in fact, a tumor of something else.