A method of optimising a digital test signal for testing an analogue or
mixed-signal circuit comprising determining a measure, for example a
figure of merit, that is indicative of differences between the output of
a fault free and the output of a known faulty circuit in response to an
applied digital input signal. The digital input signal is then varied and
another figure of merit is calculated for the fault free and the known
faulty circuit for the new input signal. This is repeated a number of
times, the digital input signal being varied each time. An optimum test
signal is selected based on the determined figures of merit.