If the patient cannot maintain tension in the muscle for the entire test period, a nerve will be stimulated to activate the muscle. A thin needle is inserted near the nerve, and a series of small electrical shocks are given to activate a nerve fiber. The electromyography needle is inserted into the muscle to measure the response, as described above.