Pulmonary function tests (PFTs) measure how well the lungs work by testing how much air a person can breathe in and out, as well as the lungs' ability to bring oxygen to the body. PFTs can help diagnose several respiratory conditions and diseases. Before the tests, patients should avoid medications, large meals, caffeine, smoking, and strenuous exercise. During the tests, patients breathe into a machine to test lung volume and capacity through spirometry, plethysmography, and diffusion capacity tests.