Those having to be tested included shipping agents, stevedores, cargo drivers, contractors, suppliers of goods and services, government agency employees and any crew members who may have come ashore.
The ports were to work with their local DHBs and take all practical steps to ensure their constituents were aware of the order. People could be tested at a community testing centre or at a testing centre set up at the port.
Auckland's port has had a testing facility waterside since Thursday. A spokesman said around 1000 people had been tested over three days.
A Port of Tauranga spokeswoman said the port had set up a testing site for the DHB, but as at Sunday evening there were no DHB testers yet on site.
She said as it was surveillance testing, people without symptoms were not required to wait until they had test results before returning to work.
"Work groups are separated at the moment due to Covid-19 precautions so it would be highly unlikely that any infection would spread far," she said.
A Maritime NZ notice said a message about the broader testing requirement had been sent to all port companies, stevedoring companies, unions, harbourmasters, agents, organisations representing the marine industry, fishing operators and maritime operators.
The Ports of Auckland spokesman said it was important to note that port workers never directly touched freight, which was handled remotely or by machines. Containers were never opened at the port by workers. The port had had Covid-19 security and restrictions in place since late January, he said.