1. A computer implemented method executed by one or more computing devices for detecting one or more symptoms and determining an optimal remedy pattern for one or more faulty components of a faulty device, the method comprising: detecting the one or more symptoms in the faulty device that are occurring due to the one or more faulty components in the faulty device; identifying the one or more faulty components from a plurality of components of the system based on the detected one or more symptoms; performing one or more tests for each identified faulty component to confirm the one or more faulty components and to check status of the faulty device; extracting historical data stored in a database; and determining the optimal remedy pattern for the identified one or more faulty components based on: the extracted historical data; cost information; a remedy cost without testing; and a remedy cost with testing.