There are several different types of sleep test for obstructive sleep apnea. A sleep test will determine whether you actually have sleep apnea and if so, your doctor may prescribe CPAP.