Here is a site explaining it:
http://www.webmd.com/brain/electromy...uction-studies
I do not personally recall having things done beforehand as the site mentions. I just know that it was not pleasant. The person doing the test can also be the reason for the unpleasantness. Many say it hurts and others it does not so much. It just depends on lots of things IMO.