Sexual dysfunction is highly prevalent in men and women. In the MMAS, 52% of the respondents reported some degree of erectile difficulty. Complete ED, defined as (1) the total inability to obtain or maintain an erection during sexual stimulation and (2) the absence of nocturnal erections, occurred in 10% of the respondents. Mild and moderate ED occurred in 17% and 25% of responders, respectively. 
Your doctor will ask you questions about your symptoms and health history. They may do tests to determine if your symptoms are caused by an underlying condition. You should expect a physical exam where your doctor will listen to your heart and lungs, check your blood pressure, and examine your testicles and penis. They may also recommend a rectal exam to check your prostate. Additionally, you may need blood or urine tests to rule out other conditions.
A physical exam checks your total health. Examination focusing on your genitals (penis and testicles) is often done to check for ED. Based on your age and risk factors, the exam may also focus on your heart and blood system: heart, peripheral pulses and blood pressure. Based on your age and family history your doctor may do a rectal exam to check the prostate. These tests are not painful. Most patients do not need a lot of testing before starting treatment.