A pulmonary function test shows how well your lungs are working. A complete test has 3 parts. You may be given the full test or only certain parts. The full test is painless and can last 45 to 90 minutes.