How soon can I test?

How many DPO?/How many days before my period can I test and get a positive result?