He unchained his two dogs and shut them in the kitchen with the tester and held the door closed.
The guard pushed his way into the kitchen after hearing the tester screaming and found him trying to climb out a window.
HNZ chief executive Glen Sowry said the man received "pretty severe wounds" to his legs, hands and forearms and was in hospital for several days.
"I can't imagine how horrifying it must have been to have the partner come into the house, abusing and screaming at you and grabbing the dogs, shoving them in the door to attack you - and then shutting and holding the door locked behind you while the dogs set on you," he said.
"It's unconscionable."
Paula Bennett was horrified to hear about the case.
HNZ has made a formal complaint to police, and Sowry has apologised to the tester.
"The tenant's partner effectively used a weapon on the tester to try to inflict harm. It happened to be two vicious dogs."
The dogs, which Sowry described as "pit-bull type fighting dogs", had been put down by Animal Control and the tenants were evicted under a fast-track process because of the severity of the incident.
There were no children living in the home.
Auckland police spokeswoman Noreen Hegarty said officers were investigating.
Quenton Dowdell - managing director of Dowdell & Associates, one of several companies contracted by HNZ for meth testing - confirmed the incident involved one of his testers.
The man had since returned to work and did not want to speak to media. The company was reviewing the incident, Dowdell said.
Sowry said it was standard to send a security guard and HNZ manager with testers.
It was "extremely rare" for testing to be carried out when tenants and their dogs were present. But the testing had gone ahead in this case as the tenant had given consent.
The dog attack happened as HNZ ramps up its testing for meth contamination as part of a harder line on criminal activity in state houses.
Initial testing of the Mt Albert house had come back positive so the tester had returned to do more intensive testing.
Housing NZ's testing for meth contamination has increased more than tenfold since 2013 when only 19 properties were tested compared with 196 last year.
HNZ either decontaminated or demolished the houses affected, depending on the severity of the contamination, a clean-up that has so far cost $3.6 million since 2013.
Sowry said it was part of its zero tolerance approach to criminal activity in state houses, as well as health and safety issues for tenants, given contamination could last for years.