when to test?

Autumn

I miscarried Last month on the 10th. I bled for 5 days. I started cramping on my left side along with CM and was lightly spotting so i knew i was ovulating about 2 days after the bleeding stopped. All my symptoms disappeared, but the passed 5 days theyve all came back. My head hurts so bad every day, my lower back and belly have been crampy, im nauseous all the time, & i have horrible heartburn. My question is, when do you think i should test?