When to test ?

How long do you wait before you take a pregnancy test? Do you ever test before your expected period or do you usually wait until you’re late?