Here is a list of Bay Area locations where testing is available, who can get it, and the conditions that must be met to get tested. Most but not all require a doctor’s order.
Bay Area coronavirus tests: Where can I get one?