1. Method for automatic defect recognition in testpieces by means of an X-ray examination unit with an X-ray tube, a detector and a mechanical manipulator for positioning the testpiece in a beam path of the X-ray examination unit, wherein a positioning image of the testpiece is compared with an ideal reference image, characterized in that an axis of rotation, an angle of rotation and a displacement vector values are calculated in order to arrive at an exact congruence of between the positioning image of the testpiece and the ideal reference image, the values of the axis of rotation, angle of rotation and displacement vector are relayed to the mechanical manipulator, which transfers the testpiece into the position corresponding to these values whereby in this position a comparison image of the testpiece, which serves for comparison with an X-ray reference image, is produced by the X-ray examination unit.