Pregnancy test

When is the best time to take one? Before or after your period?