There are no formal tests to diagnose erectile dysfunction. Some blood tests are generally done to exclude underlying disease, such as hypogonadism and prolactinoma. Impotence is also related to generally poor physical health, poor dietary habits, obesity, and most specifically cardiovascular disease such as coronary artery disease and peripheral vascular disease. Therefore, a thorough physical examination is helpful, in particular the simple search for a previously undetected groin hernia since it can affect sexual functions in men and is easily curable.
Erectile dysfunction (ED) is commonly called impotence. It’s a condition in which a man can’t achieve or maintain an erection during sexual performance. Symptoms may also include reduced sexual desire or libido. Your doctor is likely to diagnose you with ED if the condition lasts for more than a few weeks or months. ED affects as many as 30 million men in the United States.
Impotence is a common problem among men and is characterized by the consistent inability to sustain an erection sufficient for sexual intercourse or the inability to achieve ejaculation, or both. Erectile dysfunction can vary. It can involve a total inability to achieve an erection or ejaculation, an inconsistent ability to do so, or a tendency to sustain only very brief erections.
The more you puff, the more you put your penis at risk, according to a study from the Tulane University School of Public Health and Tropical Medicine. The researchers examined 7,684 men between the ages of 35-74 and concluded about 23 percent of erectile dysfunction cases can be chalked up to cigarette smoking. This is probably the best motivator If you've been struggling to quit.
Stiffy Solution: The good news is, almost all of these conditions can be successfully treated if you catch them early on. And since erectile problems may be the first side effect your dude has experienced, seeking medical treatment for his erectile problems may be the thing to get him into a doctor's office. So if your dude is a well-rested, non-drinking, non-smoking, paragon of relaxation who suddenly can't get wood, urge him to talk to his doctor — his misbehaving penis may actually be communicating something way more important than "Not tonight, honey."
Both ED and low testosterone (hypogonadism) increase with age. The incidence of the latter is 40% in men aged 45 years and older.  Testosterone is known to be important in mood, cognition, vitality, bone health, and muscle and fat composition. It also plays a key role in sexual dysfunction (eg, low libido, poor erection quality, ejaculatory or orgasmic dysfunction, reduced spontaneous erections, or reduced sexual activity). 
But if the blood flow is weak here, it is highly likely that it is also weak in arteries supplying the heart, raising the risk of a heart attack. In fact, some studies suggest that women with heart disease may also suffer sexual dysfunction: the clitoris, like the penis, is a vascular organ, and also relies on healthy blood flow for successful orgasms.
PDE 5 inhibitors are broken down primarily by enzyme, cytochrome P450enzyme CYP3A4. Medications that decrease or increase the activity of CYP3A4 may affect levels and effectiveness of PDE 5 inhibitors. Such drugs include medications for the treatment of HIV (protease inhibitors) and the antifungal medications ketoconazole and itraconazole. Thus caution is recommended.
Erectile dysfunction is clearly a symptom of many conditions, and certain risk factors have been identified, some of which may be amenable to prevention strategies. Diabetes mellitus, hypogonadism in association with a number of endocrinologic conditions, hypertension, vascular disease, high levels of blood cholesterol, low levels of high density lipoprotein, drugs, neurogenic disorders, Peyronie's disease, priapism, depression, alcohol ingestion, lack of sexual knowledge, poor sexual techniques, inadequate interpersonal relationships or their deterioration, and many chronic diseases, especially renal failure and dialysis, have been demonstrated as risk factors. Vascular surgery is also often a risk factor. Age appears to be a strong indirect risk factor in that it is associated with an increased likelihood of direct risk factors. Other factors require more extensive study. Smoking has an adverse effect on erectile function by accentuating the effects of other risk factors such as vascular disease or hypertension. To date, vasectomy has not been associated with an increased risk of erectile dysfunction other than causing an occasional psychological reaction that could then have a psychogenic influence. Accurate risk factor identification and characterization are essential for concerted efforts at prevention of erectile dysfunction.
It is normal for a man to have five to six erections during sleep, especially during rapid eye movement (REM). Their absence may indicate a problem with nerve function or blood supply in the penis. There are two methods for measuring changes in penile rigidity and circumference during nocturnal erection: snap gauge and strain gauge. A significant proportion of men who have no sexual dysfunction nonetheless do not have regular nocturnal erections.
…have traditionally been classified as impotence (inability of a man to achieve or maintain penile erection) and frigidity (inability of a woman to achieve arousal or orgasm during sexual intercourse). Because these terms—impotence and frigidity—have developed pejorative and misleading connotations, they are no longer used as scientific classifications, having been…
You're right that this should be a last resort, but Paduch also agrees that sometimes a little confidence can help you get back on track. The thing is, you should only take an ED medicine if it's prescribed by your doctor (otherwise you'll miss out on the important medical info you should know before you take it). Another option is an l-arginine supplement, which can increase nitric oxide and blood flow.
Diabetes is a well-recognized risk factor for ED. A systematic review and meta-analysis found that the prevalence of ED was 37.5% in type 1 diabetes, 66.3% in type 2 diabetes, and 52.5% in diabetes overall—a rate approximately 3.5 times higher than that in controls.  The etiology of ED in diabetic men probably involves both vascular and neurogenic mechanisms. Evidence indicates that establishing good glycemic control can minimize this risk.
Physicians make a diagnosis of erectile dysfunction in men who complain of troubles having a hard enough erection or a hard erection that does not last long enough. It is important as you talk with your doctor that you be candid in terms of when your troubles started, how bothersome your erectile dysfunction is, how severe it is, and discuss all your medical conditions along with all prescribed and nonprescribed medications that you are taking. Your doctor will ask several questions to determine if your symptoms are suggestive of erectile dysfunction and to assess its severity and possible causes. Your doctor will try to get information to answer the following questions:
The association between low testosterone and ED is not entirely clear. Although these 2 processes certainly overlap in some instances, they are distinct entities. Some 2-21% of men have both hypogonadism and ED; however, it is unclear to what degree treating the former will improve erectile function.  About 35-40% of men with low testosterone see an improvement in their erections with testosterone replacement; however, almost 65% of these men see no improvement. 
Men with physical causes of ED have options, including such medicines as sildenafil (Viagra®), vardenafil (Levitra®), or tadalafil (Cialis®). Men who use nitroglycerin products and those who should avoid sexual activity because of cardiovascular disease shouldn’t take these drugs. Other treatment modalities include use of a vacuum pump or injection of a substance (papaverine) into the penis to increase blood flow to the penis. Men can also have surgery to put a prosthesis into the penis.
Three forms of penile prostheses are available for patients who fail with or refuse other forms of therapy: semirigid, malleable, and inflatable. The effectiveness, complications, and acceptability vary among the three types of prostheses, with the main problems being mechanical failure, infection, and erosions. Silicone particle shedding has been reported, including migration to regional lymph nodes; however, no clinically identifiable problems have been reported as a result of the silicone particles. There is a risk of the need for reoperation with all devices. Although the inflatable prostheses may yield a more physiologically natural appearance, they have had a higher rate of failure requiring reoperation. Men with diabetes mellitus, spinal cord injuries, or urinary tract infections have an increased risk of prosthesis-associated infection. This form of treatment may not be appropriate in patients with severe penile corporal fibrosis, or severe medical illness. Circumcision may be required for patients with phimosis and balanitis.
Yohimbine: The main component of an African tree bark, yohimbine is probably one of the most problematic of all natural remedies for ED. Some research suggests that yohimbine can improve a type of sexual dysfunction that is linked with a drug used to treat depression. However, studies have linked yohimbine to a number of side effects, which can include anxiety, increased blood pressure, and a fast, irregular heartbeat. Like all natural remedies, yohimbine should only be used after advice and under supervision from a doctor.
Qaseem, A., Snow, V., Denberg, T. D., Casey, D. E., Forciea, M. A., Owens, D. K., & Shekelle, P. (2009). Hormonal testing and pharmacologic treatment of erectile dysfunction: A clinical practice guideline from the American College of Physicians. Annals of internal medicine, 151(9), 639-649. Retrieved from http://annals.org/aim/article/745155/hormonal-testing-pharmacologic-treatment-erectile-dysfunction-clinical-practice-guideline-from