I think I may be pregnant...

I had unprotected sex about two maybe three weeks ago and I've been in pain while peeing and was spoting for a few days. I haven't taken a test yet but I should be getting my period around the 29th this month. Should I wait to take the test or take it now? Would it make a difference? What should I do?