Testing of a system is an experiment in which the system is exercised and its resulting response is analysed to ascertain whether it behaved correctly. If incorrect behavior is detected, the second goal of a testing experiment is a diagnose, or locate, the cause of the misbehavior.
An instance of an incorrect operation of the system being tested is referred to as an error. The causes of the observed errors may be design errors or physical faults. In general, physical faults do not allow a direct mathematical treatment of testing and diagnosis. The solution is to deal with logical faults (or fault models), which are a convenient representation of physical faults.