When should I test?

I had a miscarriage Sep 2016 and haven't had regular periods since. I currently haven't had a period since June 2017 but randomly ovulated July 26 2017. I took a test this afternoon and it was negative. When should I test??