When to take a test?

How many days after a missed period should I do a test?