A method for testing a digital electronic circuit, wherein the digital electronic circuit comprises a voltage regulator configured to supply a digital supply voltage to internal digital circuitry of the digital electronic circuit, and wherein the voltage regulator comprises an op-amp voltage regulator having differential inputs coupled respectively to an output of the op-amp voltage regulator by a negative feedback network and to a reference voltage, the method comprising:
- coupling an external test equipment to the digital electronic circuit in order to apply an external voltage signal to the digital electronic circuit when an automatic test pattern generation (ATPG) procedure with a given test pattern is performed, wherein a value of the external voltage signal is controlled by the external test equipment;
- and
- measuring, at the external test equipment, the digital supply voltage at an output of the voltage regulator and at an input of the internal digital circuitry,
- wherein the external voltage signal is applied to the differential inputs of the op-amp voltage regulator through an adaptation circuit to obtain determined values of the digital supply voltage.