Testing often begins with a contrast brain MRI (with IV dye). This can show signs of a spinal fluid leak and low CSF pressure. There are other tests that can be considered after that, depending on the clinical scenario and MRI results. Some other tests done can include MRI spine with CSF leak protocol (heavily weighted T2), CT or MRI myelogram. Radionuclide cisternogram is another test, but is not done as much anymore because it is often not very helpful. Sometimes checking the pressure of the CSF (opening pressure) is considered, although the concern is that it could potentially cause a leak at the same time since you are puncturing the dural membrane in the process.
Much of this diagnosis comes from the clinical history as well. Specifically, a positional component. Meaning, the headache goes away or improves significantly when lying down, and worsens after standing up. It occurs most often from a spontaneous CSF leak in the spine. However, if there is a lot of clear drainage from the nose, CSF leaks can also occur into the sinuses and nasal passages. ENT (ear nose and throat doctors) have a test that they can do to test the fluid from the nose to see if it is CSF or normal sinus/nasal drainage.