But in places that have seen cases spike in recent weeks, many people expressed frustration that the more likely they were to get the virus, the less likely they were to have access to a test.

In Washington State, where at least 378 people have tested positive and 31 have died, public health officials spoke of having to ration the tests and living hand-to-mouth with testing supplies. “At this time we are limiting testing to preserve availability for our most vulnerable,” said Debra Carnes, a spokeswoman for PeaceHealth Columbia Network, a nonprofit health system that operates clinics in Washington, Oregon and Alaska.

Overlake Medical Center in Bellevue, Wash., has been running low on nasal swabs to collect specimens from patients.

“We expected another shipment tomorrow,” said Morgan Brice, a public relations specialist.

One mother in Kitsap County, Wash., said her doctor told her that the state was so low on tests that only one of her children could be tested.

That left many anxious people with mild symptoms running a never-ending gantlet: primary care doctors referred them to state public health officials, who referred them to emergency rooms, who referred them back to primary care doctors. Some patients said they gave up and went into self-quarantine, and had to make peace with the idea that they will never know for sure if they had the virus.

Christy Karras of Seattle tried to get tested after some people at a party she attended came down with flu-like symptoms. But her doctor did not have the test and advised her that it did not matter whether she had the virus: Either way, she had to stay home.

“From a public policy standpoint, that’s true,” Ms. Karras said. “From an individual standpoint, you really want to know what you have. It was very frustrating to me because we were all trying to do the right thing.”