When to take pregnancy test

okay so my period isn’t supposed to start until the 18th. i had sex on the 31st. is the test still valid if i take it on the 11th even though i haven’t missed my period? (i missed 3 bc pills)