The non-invasive, painless lung function tests are available.  They entail breathing into and exhaling into specialized equipment.  The entire set of tests takes 20 to 60 minutes.  A test called spirometry can determine how well you breathe in and out.