When to test?

Patient: I have recently come off the pill to try for a baby. My periods have been a little messed up, I had a withdrawl bleed then a period 40 days later. For 4 days I have had tummy pains like I am coming on but no period. It has been 30 days now since the start of my last period. Is this just my body getting used to not being on the pill or could I be pregnant? When could I take a test? I thought I was ovulating 11 days ago but I could be wrong.Thanks

Doctor: