Ching Long House in Ching Ho estate was sealed off at 7pm, and anyone inside must undergo tests before 11pm.
Authorities said they hope to complete the operation at midday Wednesday.
A statement said people subject to the testing order must stay at their flats until all results are ascertained, and officers will also arrange door-to-door specimen collection for people with impaired mobility.
The order also stated that anyone who had stayed at the building for more than two hours between February 2 and 15 have to undergo tests on or before February 17, including those who had recently been tested and people who are vaccinated.