pregnancy test

How soon and I take a test and it be accurate?