The test, as administered to Sayid and Clair works like this:
They fry you. Really really fry you. If you're still awake you fail. If you're dead you pass.
We the audience assumes a torturous amount of electricity is flowing through the tested, but only because they walk away from it. If you survive the highly lethal dosage (and indeed even retain consciousness) then you are infected/claimed/zombified/whatevered. Like testing for a Witch in the Monty Python universe, had Sayid and Clair died on the table they would have been proven uninfected. My guess is those who pass would be taken to the spring and those who fail are branded as such and told to GTFO.
This might also have something to do with the need to swallow the sleep inducing OJ when traveling to and from the island by submarine. Everyone assumed it was to ward off the effects of the time sickness when attempting to leave on the wrong compass bearing. I think it just might be an updated version of "the test" to ensure one of MiB's henchmen isn't aboard (and about to infect the outside world). Only the infected remain conscious and do so even with no self-knowledge of infection. Part of the original Truce between the Other's and Dharma may have included a provision for ensuring that the infection couldn't spread. This was again hinted at when young Rousseau shot her fellow castaways in fear of rescue and the infection spreading. I assume that the reason the DI had you take the juice both ways was to ensure no one would come to the island who would then subsequently fail to comply with the order. If you acquiesced on the way in, then you'll likely drink up on the way o! ut too. Failure to comply probably means they'll shoot you dead on the spot.
There is another test though which is more interesting because we didn't spot it at first. We watched as Sayid was held underwater in the spring waiting for an hourglass to pour out. Why? We were shown a moment before that the spring should have been clear, and should have healed the bleeding hand that was dipped into it. At this point the temple others did not know Jacob was dead. But they had orders from Jacob to try and save Sayid, so they did. But the spring did not work, and they pronounced Sayid dead. Sayid woke up because the infection kicked in. Like the electricity, and OJ tests, you are expected to lose consciousness in that pool of water. If you don't... well you know what happens next. Had the hourglass run out and Sayid continued struggling then there would have been no need to run the electricity test.
Knowing who the candidates are now, watching earlier scenes such as Jack running through the jungle with volatile explosives bouncing up and down on his back start to make perfect sense. Artz went kabloooeee the moment he was far enough away that he wouldn't also take out a candidate. This was redrilled into our heads with Richard at the blackrock. Candidates can not kill themselves, which (if they knew) would give them incredible power.