The long-awaited trial will start at the Yours and Owls Festival on the first weekend in March at Wollongong, on the NSW south coast.
Organisers said a legal amnesty would be declared at the pill-testing site so patrons can't be charged with drug offences.
But police will patrol the rest of the festival and could theoretically arrest someone who had recently left the amnesty area, which could limit the effectiveness of a scheme aimed at helping people make safer choices.
"It's a brave festival-goer who will voluntarily walk into a government-run tent to hand their drugs over for testing to a government official when they've just run the gauntlet of police and sniffer dogs," Greens MP Cate Faehrmann told AAP.
"Pretty much everywhere else on earth where pill testing takes place at music festivals there is minimal visible police presence, but not here in NSW."
Premier Chris Minns previously said that police would still enforce the law at festivals despite the trial.
Pill testing is legal in Queensland and the ACT, while Victoria launched a trial over summer.
About 600 drug samples were tested by The Loop Australia at Beyond the Valley Festival, where Victoria's trial started.
The organisation said almost 40 per cent of those who used the service intended to take a smaller amount of drugs afterwards.
Ben Tillman, from Yours and Owls, said his festival did not condone drug use and the same laws would apply there as in everyday life.
"However, we have a discrete entrance to the drug testing facility, which is right beside the medical tent, so people won't necessarily know from outside whether they're going in to seek medical advice or they're going in to have their drugs tested," he said.
"Within that testing site is a legal amnesty area, so no one will be able to be charged with supply or use of drugs … they can feel safe they won't be charged for possession or supply."
Pill testing was a proven harm minimisation strategy that had been successfully implemented in many countries for about 20 years, Mr Tillman added.
The state Labor government announced in December it would allow a 12-month trial of pill-testing at music festivals in NSW from early 2025 after earlier resisting the move.
On a government website, authorities said they would work together "to ensure patrons can access the drug-checking service without concern" on the question of police and sniffer dogs at testing sites.
"This trial has been designed to provide people with the necessary information to make more informed decisions about drug use, with the goal of reducing drug-related harm and saving lives," Health Minister Ryan Park said.
The free and anonymous service will allow festival goers to bring a small sample of substances they intend to consume to be analysed by health staff to test for purity, potency and adulterants.