You should see a GP for advice if you develop a persistent cough so they can look for a possible cause.
The GP will ask you about your symptoms, such as how often you cough, whether you bring up any phlegm (sputum), and whether you smoke.
They may also listen to your lungs with a stethoscope as you breathe in and out. The lungs of people with bronchiectasis often make a distinctive crackling noise as a person breathes in and out.
You'll also probably have a chest X-ray to rule out other, more serious, causes of your symptoms, such as lung cancer.
If the GP thinks you may have a lung infection, they may take a sample of your phlegm so it can be checked for bacteria.
If the GP suspects you could have bronchiectasis, you'll be referred to a doctor who specialises in treating lung conditions (a respiratory consultant) for further testing.
Currently, the most effective test available to diagnose bronchiectasis is called a high-resolution CT (HRCT) scan.
A HRCT scan involves taking several X-rays of your chest at slightly different angles. A computer is then used to put all the images together.
This produces a very detailed picture of the inside of your body, and the airways inside your lungs (the bronchi) should show up very clearly.
In a healthy pair of lungs, the bronchi should become narrower the further they spread into your lungs, in the same way a tree branch separates into narrower branches and twigs.
If the scan shows that a section of airways is actually getting wider, this usually confirms bronchiectasis.
Other tests can be used to assess the state of your lungs and to try to determine what the underlying cause of your bronchiectasis may be.
These tests may include: