The tests will be for a restricted number of substances. The idea is to catch those cheating to reach the top level rather than, for example, someone taking medicine to help with asthma.
The DFSNZ statement said: "In the rare event that a positive test results from properly administered medication the opportunity to apply for an exemption permitting the medical use is available."
Outside that, the normal results management process and, where applicable, sanction regime would apply.
The DFSNZ statement said they had identified elements within the schools rugby environment which indicate a significant potential for doping to occur.
"This includes research conducted by Otago University on behalf of DFSNZ showing extensive and uncontrolled supplement use, along with the knowledge that doping (and in particular anabolic steroid use) is occurring in comparable environments overseas, notably South Africa and the UK.
"DFSNZ has the mandate and responsibility to act in environments where it believes there is a significant potential for doping to occur."
New Zealand Rugby Players' Association chief executive Rob Nichol said the decision was a "slippery slope".
"We're incredibly disappointed. This is school; an educational environment for kids to learn. Now we're talking about policing them under an anti-doping regime which is extremely staunch.
"[DFSNZ's] answer was more concerning; they were struggling to get into the schools to educate them. Our question to schools is: Why would you not embrace the opportunity to educate those in sporting environments - and their parents - around the risks associated with doping in sport, and in particular supplements?
"I'd have thought schools had a moral obligation. To hear the DFSNZ programme wasn't taken up, or was poorly attended left us astounded."
Nichol believed educational programmes should have been made compulsory.
"We're concerned where this is going to lead. Having schools become [sports] performance-driven, particularly around rugby, rowing and other sports, rather than education-driven is a concern.
"[DFSNZ] are concerned the temptation to cheat is there by getting bigger and advancing their sporting careers, but we've been out to a lot of the schools and haven't come across any deliberate doping regimes. But we know it's happened in Wales and South Africa, so the schools need to wake up and take notice. That is unbelievably sad.
"How will people feel if 16 or 17-year-olds test positive months before their final exams. Imagine the stress that's going to come down on the kid, the family and the school. Who's going to be there to support them?"
DFSNZ chief operating officer Scott Tibbutt said a deterrent was required:
"International research says education alone needs to be reinforced with some consequences, otherwise you have drink-driving ads on tv but no booze buses on the road.
"I probably sympathise a bit with school principals, they have a lot of other things to deal with day-to-day in addition to requests to run drug-free sport seminars. No principal wants to believe their school's involved in that."
A 2013 survey, featuring almost 150 first XV players, resulted in 70 per cent admitting they took four or more supplements, with 90 per cent of them concerned about the safety of the products.
Nichol said NZRPA believed the best players would rise through the ranks regardless of supplement use.
"We're more interested in breeding good students with life skills and work ethics so that if they do pursue a sporting career at the high performance level they've got the fundamentals of character to put themselves through hard work.
"A lot of money is being spent on supplements which just aren't needed at that [secondary school] level."
Garry Carnachan, the New Zealand Secondary Schools Sports Council executive director, said it was understandable DFSNZ wanted to test where they saw risk.
"The evidence they've collected suggests that is the case. They have the mandate to do that, and we can't veto it, so we've been pleased to work with them to ensure there's mandatory education prior to the event.
"They've also been able to limit the range of substances tested to reduce the opportunity for an innocent positive test."
Auckland Grammar School headmaster Tim O'Connor had concerns over the timeframe for consultation.
"I would have liked to have seen a group educationalists involved in the decision-making around this and consider it from all angles.
"The other issue is around consent. While the NZSSSC is suggesting the headmaster can sign off on consent, I personally would feel very uncomfortable with that.
"There is some invasion of privacy that comes with the process. If I were the parent of an amateur sportsman, I would like some reassurance for my teenage son that there would be some respect and care around the process."
O'Connor said he had not had time to consult with parents over the decision.
"We've only just been given the information as to what will be occurring. I think the [NZSSSC] rushed it.
"To introduce drug testing in a school environment is quite different from a professional environment.
"That doesn't mean we want to protect anyone. The concept of Drug Free Sport is one we fully support, and the integrity and spirit of sport at all levels cannot be compromised."