Mr. Azar’s assertion echoed one made by Vice President Mike Pence at a White House news conference Friday evening, in which the vice president said that doctors treating potentially symptomatic Americans could contact local officials and have state labs do the testing.

During a visit to the mask producer 3M in Minnesota on Thursday, Mr. Pence acknowledged the constraints of testing. “We don’t have enough tests today to meet what we anticipate will be the demand going forward,” he said.

In recent weeks, Mr. Trump has remained publicly upbeat, minimizing the potential consequences of the virus, which he has said could disappear this spring in warmer weather. “A vast majority are going to be fine,” the president said on Friday about Americans who have the virus, portraying it as similar to the flu.

“I’m not concerned at all,” the president said on Saturday when asked about the coronavirus getting closer to the White House.

In private, White House officials have cast Mr. Azar as “alarmist.”

On Friday, Mr. Trump characterized the government’s testing aptitude as “amazing” and called the C.D.C.’s test “perfect,” statements that have been roundly disputed by scientists and health officials who have expressed alarm over the speed with which the C.D.C. has tested and over the quality of its tests.

Consistent messaging, Dr. Sharfstein said, helps with the “fear of the unknown.”

“Testing is a more confusing topic than it can seem,” he said. “People can be overly reassured by a negative test or overly panicked by a positive test. Having a thoughtful approach to testing is important.”

The number of people who can be tested for the coronavirus and the number of tests available are fluid, federal officials said on Saturday at the White House briefing.