Cortisol testing is a medical test that measures the level of cortisol in your blood, urine, or saliva. Cortisol is a hormone produced by your adrenal glands, which are located on top of your kidneys. It’s often referred to as the “stress hormone” because it helps your body respond to stress.