LONDON — When Prime Minister Boris Johnson spoke to the British people from isolation on Wednesday, still suffering his own bout of the coronavirus, he said the key to overcoming the pandemic was more testing. “This is how we will unlock the coronavirus puzzle,” he said in a shaky, hand-held video.

In fact, the British government came very late to the recognition that testing for the virus is a key part of fighting it, by helping to slow transmission. That failure has set off an outcry in the country. The government’s tardiness has left Britain with an undersupplied and poorly coordinated testing program that has reached only a fraction of the people tested in countries like Germany or South Korea.

The shortfall has frustrated doctors and nurses, who often have not had access themselves to tests despite potential exposure to the virus and who cannot quickly determine if patients have it. It has angered public-health experts, who say Britain is squandering valuable time during the lockdown that it could be using to get a better fix on the spread of the virus in the population.

Front-line doctors and nurses in the United States, where testing is now being ramped up, complained for weeks of similar deficiencies.