Confused! Please help !!

My af was 4 days late and I had cramps, sore breasts and frequent urination before periods. They are usually 6-7 days long but this time they were just for 3 days. I have pain in my legs and back . It was strange, is it possible that I had a miscarriage or is is it something else? What should I do ? Should I take a pregnancy test?