The coronavirus has found a crack in the nation’s public health armor, and it is not one that scientists foresaw: diagnostic testing.

The Centers for Disease Control and Prevention botched its first attempt to mass produce a diagnostic test kit, a discovery made only after officials had shipped hundreds of kits to state laboratories.

A promised replacement took several weeks, and still did not permit state and local laboratories to make final diagnoses. And the C.D.C. essentially ensured that Americans would be tested in very few numbers by imposing stringent and narrow criteria, critics say.

On Monday, following mounting criticism of the federal response, Trump administration officials promised a rapid expansion of the country’s testing capacities. With the help of private companies and academic centers, as many as a million diagnostic tests could be available by the end of this week, said Dr. Stephen Hahn, commissioner of the Food and Drug Administration.