Spotting or period

Victoria
I had spotting today and my period was due today ? If I was pregnant when would the test be positive .