There are about 300 + biochemical reaction in a human body where magnesium plays a vital role. Be it the regular nerve function or muscle function, heartbeats or immunity system; magnesium plays an integral part. Magnesium testing is prescribed by the doctors when there is a low blood level of calcium and potassium in the patient's body. Many patients complaining of muscle weakness, cramping, cardiac arrhythmias, magnesium testing for them becomes imperative. Through magnesium testing, the levels of magnesium, in the blood or urine are measured.