Best Time to test

I was wondering what the best time to test would be. x amount dpo, x amount of days before Af?