Diagnosis is difficult, but there are blood tests (IgE, IgG, galactomannan), radiology (x-ray & CT scan), symptomology, sputum analysis, bronchoscopy. The final diagnosis is usually a decision based on a collection of test results rather than any one test being diagnostic - see https://aspergillosis.org/diagnosis/ for details.