Spirometry. This is the main test doctors generally use to diagnose asthma in people 5 years or older. To help determine how well your lungs are working (pulmonary function), you take a deep breath and forcefully breathe out (exhale) into a tube connected to a spirometer.