A diagnosis is an accurate and precise account of the nature or cause of something.
Medical diagnosis is the best-known field, but diagnosis can be applied to any subject. Whereas a doctor diagnoses what is wrong with a patient, a motor mechanic can diagnose the fault in a car. In all cases they replace a vague query, such as "My car won't start", with an exact analysis, such as "It's out of petrol". Notice the diagnosis is precise enough so the solution can be seen.
These ideas work even in more subtle cases. A boy brings an insect in a box to a natural history museum. He asks an expert "What is this?" The expert says "You mean, apart from it being a beetle?" When the boy nods, the expert looks at the insect under a magnifying glass, or a binocular microscope. Chances are, it is a common beetle, and the expert can give the boy quite a lot of information about it.
But if it is not known to the expert, a much longer study is needed. Large reference books will be consulted; trays of similar insects will be taken out of store to be compared. A full diagnosis needs at least the genus and species. If the species is unknown, the detailed work of description is needed for publication. Mostly, in biological taxonomy, the adjective 'diagnostic' is used for any distinctive trait which places the specimen in a precise category. For example, A single bone making up the lower jaw is diagnostic of a mammal.
'Diagnostics' is the name given to procedures which spell out what to do to find the cause of a fault. This term is used a lot in computer systems.