Method for configuring a device for non-destructive testing of a mechanical part, the device including an optical movement-monitoring system, a non-destructive testing sensor connected fixedly to a first rigid body, and a pointing device including a tip and fixedly connected to a second rigid body, the method including steps of: learning an origin of an examination zone of the surface of the mechanical part using the pointing device, in a reference frame (Ro) relating to the optical movement-monitoring system, learning axes of the examination zone of the mechanical part by means of the pointing device, in the reference frame (Ro) relating to the optical movement-monitoring system, so as to define a reference frame (R Z) relating to the examination zone, the method being characterised in that it includes steps of: learning an origin and axes of an emitting and receiving surface, referred to as the active surface, of the sensor by means of the pointing device, in a reference frame (R C) relating to the first rigid body of the sensor, by determining an origin and axes of the active surface in the reference frame (Ro) linked to the optical movement-monitoring system, simultaneous determination of the coordinates and of the orientation of the reference frame (R C) relating to the first rigid body of the sensor in the reference frame (R O) relating to the optical movement-monitoring system, and changing reference frame between the reference frame (R O) relating to the optical movement monitoring system and the reference frame (R C) relating to the first rigid body of the sensor, and determining the position and the orientation of the active surface of the sensor, in the reference frame relating to the examination zone. learning an origin of an examination zone of the surface of the mechanical part using the pointing device, in a reference frame (Ro) relating to the optical movement-monitoring system, learning axes of the examination zone of the mechanical part by means of the pointing device, in the reference frame (Ro) relating to the optical movement-monitoring system, so as to define a reference frame (R Z) relating to the examination zone, the method being characterised in that it includes steps of: learning an origin and axes of an emitting and receiving surface, referred to as the active surface, of the sensor by means of the pointing device, in a reference frame (R C) relating to the first rigid body of the sensor, by determining an origin and axes of the active surface in the reference frame (Ro) linked to the optical movement-monitoring system, simultaneous determination of the coordinates and of the orientation of the reference frame (R C) relating to the first rigid body of the sensor in the reference frame (R O) relating to the optical movement-monitoring system, and changing reference frame between the reference frame (R O) relating to the optical movement monitoring system and the reference frame (R C) relating to the first rigid body of the sensor, and determining the position and the orientation of the active surface of the sensor, in the reference frame relating to the examination zone. learning an origin and axes of an emitting and receiving surface, referred to as the active surface, of the sensor by means of the pointing device, in a reference frame (R C) relating to the first rigid body of the sensor, by determining an origin and axes of the active surface in the reference frame (Ro) linked to the optical movement-monitoring system, simultaneous determination of the coordinates and of the orientation of the reference frame (R C) relating to the first rigid body of the sensor in the reference frame (R O) relating to the optical movement-monitoring system, and changing reference frame between the reference frame (R O) relating to the optical movement monitoring system and the reference frame (R C) relating to the first rigid body of the sensor, and determining the position and the orientation of the active surface of the sensor, in the reference frame relating to the examination zone.