Cystic fibrosis (CF) is the most common inherited disorder of childhood. The diagnosis of CF has traditionally been based on clinical features with confirmatory evidence by sweat electrolyte analysis. Since 1989 it has been possible to also use gene mutation analysis to aid the diagnosis. Cloning of the cystic fibrosis transmembrane conductance regulator (CFTR) gene has advanced our understanding of CF, in particular the molecular basis of an expanded CF phenotype. However, because there are over 1000 mutations and 200 polymorphisms, many without recognised effects on CFTR, the molecular diagnosis can be troublesome. This has necessitated measurement of CFTR function with renewed interest in the sweat test. This review provides an overview of the clinical features of CF, the diagnosis and complex genetics. We provide a detailed discussion of the structure and function of CFTR and the classification of CFTR mutations. Sweat electrolyte analysis is discussed, from the physiology of sweating to the rigours of a properly performed sweat test and its interpretation. With this information it is possible to understand the relevance of the sweat test in the genomic era.