Two kinds of tests are available for COVID-19: diagnostic tests and serologic (antibody) blood tests. A serologic test may not be able to show if you have a current infection, because it can take 1-3 weeks to make antibodies after symptoms occur.
We do not know yet if having antibodies to the virus can protect someone from getting infected with the virus again, or how long that protection might last.
To learn if you have a current infection, diagnostic tests are used. But not everyone needs this test. If you test positive or negative for COVID-19, no matter the type of test, you still should take preventive measures to protect yourself and others.