Assessing respiratory mechanics and muscle function is critical for both clinical practice and research purposes. Several methodological developments over the past two decades have enhanced our understanding of respiratory muscle function and responses to interventions across the spectrum of health and disease. They are especially useful in diagnosing, phenotyping and assessing treatment efficacy in patients with respiratory symptoms and neuromuscular diseases. Considerable research has been undertaken over the past 17 years, since the publication of the previous American Thoracic Society (ATS)/European Respiratory Society (ERS) statement on respiratory muscle testing in 2002. Key advances have been made in the field of mechanics of breathing, respiratory muscle neurophysiology (electromyography, electroencephalography and transcranial magnetic stimulation) and on respiratory muscle imaging (ultrasound, optoelectronic plethysmography and structured light plethysmography). Accordingly, this ERS task force reviewed the field of respiratory muscle testing in health and disease, with particular reference to data obtained since the previous ATS/ERS statement. It summarises the most recent scientific and methodological developments regarding respiratory mechanics and respiratory muscle assessment by addressing the validity, precision, reproducibility, prognostic value and responsiveness to interventions of various methods. A particular emphasis is placed on assessment during exercise, which is a useful condition to stress the respiratory system.