A cortisol test is used to help diagnose medical conditions that cause too much or too little cortisol. These conditions include disorders that affect the adrenal glands: Cushing's syndrome is a disorder that happens when your body has too much cortisol over a long period of time