Testing of optical devices, constituted by fibre optics or optical waveguides