Pregnancy test

When is the earliest I should take a pregnancy test?