Pulmonary function testing is needed to determine the pathophysiology present in the patient with cardiopulmonary disease. Blood gases and pH should be obtained during emergency situations and during cranial, thoracic, and extensive cervical or abdominal surgery. Lung function tests can be divided in global such as spirometry and diffusing capacity which study the ventilation and transfer of gases and regional determinations of ventilation and perfusion. Both types of tests complement each other and should be used together. The spirometry should consist at least of determination of the vital capacity and is determined in the first second to ascertain if there is obstructive lung disease. Some tests such as flow-volume curves, alveolar-arterial gradients and closing volume are very useful to detect early pulmonary disease before any symptoms or findings are present. This is probably one of the most important medical indications for pulmonary function testing. Before certain types of surgery pulmonary function testing is indicated; if the spirometry and diffusing capacity tests are normal, there is no pulmonary contraindication for the planned surgery. In chest surgery if there is significant compromise of the spirometry and diffusing capacity regional lung function tests are indicated to study the pathophysiology at regional level, thus trying to circumscribe the lung resection to the diseased areas.