“It’s the way we do things here,” said Dr. David Speers, the top microbiologist at PathWest Laboratory Medicine, the government laboratory in Western Australia. “We always try to plan ahead.”

Technical speed and laboratory organization, though, do not explain everything. The availability of testing — at least in some countries — also reflects policy.

When Australia identified its first coronavirus patient in late January, political leaders made clear that testing would be widespread. “We’re testing people,” Dr. Kerry Chant, the top public health official in New South Wales, said on Jan. 30. “We’re asking people to come forward, and I want to acknowledge the fact that we have had so many people come forward for testing.”

Even before the virus began spreading in Singapore, the prime minister, Lee Hsien Loong reminded the public about the 2003 SARS outbreak and said he planned to overreact to the coronavirus. “We have built up our institutions, our plans, our facilities, our stockpiles, our people, our training,” he said on Jan. 31. “Because we knew that one day something like that would happen again.”

South Korea opened nearly 600 testing clinics, including dozens of drive-through stations. More than 250,000 people have been tested — far more than any other country that has released data.

The country has largely contained its outbreak to the southeast city of Daegu. Most cases are linked to a cluster around the Shincheonji Church of Jesus.

“Korea’s approach was: Test everybody,” Dr. Kim said. “Anybody who needs a test should get tested.”

The United States, along with countries in Western Europe, chose a different strategy and tone. While Singapore warned that infections were certain to increase, Mr. Trump predicted it would disappear within weeks.