It would vary depending on the condition that is being tested. STDs behave differently due to the varying pathogenicity of each STD’s causative organism. In some instances, you can get accurately tested as early as two weeks following exposure, while some are intermittently inaccurate due to its recurrence (much like in the case of herpes infections). To avoid this, be sure to discuss the intricacies of the test with your physician to understand whether a particular test could provide you with a conclusive diagnosis or if it still needs another confirmatory test to establish its premise.
If you didn’t find what you needed, these could help!