A method for optimizing a test sequence to diagnose a failure mode of a device, such as a vehicle, is provided. At least one symptom of a fault of the device is received, and a plurality of taxonomies is generated. The taxonomies include a device component taxonomy, a fault taxonomy, and a diagnostic taxonomy, and each taxonomy has a plurality of nodes. At least one diagnostic test sequence, based on the symptom and the taxonomies, is generated, costs associated with the diagnostic test sequence are determined, and a cost optimal test sequence, based on the costs and the diagnostic test sequence, is generated.