While my experience is in neurophysiological testing during surgery, many of my patients have had these tests. The testing involves electrically stimulating a nerve (usually a suspect one and preferably comparing the opposite "normal" one), typically using a needle (does hurt a bit, but important), then recording the response of either a muscle to which the nerve goes, or going further towards the spinal cord. The information needed is how fast the signal goes, and how much signal gets there. Damaged (pressure, disease) nerves are slower and transmit less signal. This information is critical in many diagnoses, especially if surgery to release a nerve is being considered.