In this paper the problem of vibration measurement and testing for quality control of electronic components is approached. In general, many tests are performed on electronic devices (personal computers, power supply units, lamps, etc.), according to international standards (IEC), in order to verify their resistance to shock and vibrations, but these are mainly `go no-go' experiments, performed on few samples taken from the production batches. The idea here proposed is to improve the efficiency of these tests by using electro-optic techniques for the measurement of the vibration behavior of the components under known excitation. This would allow the on-line testing of a high percentage of the production and would be useful to give important feedback to the design process. Scanning laser Doppler vibrometry seems to be a valuable solution for the problem, thanks to its capabilities of measuring several spatially- defined points on a vibrating object with reduced testing time for on-line application, with high sensitivity and accuracy, non-intrusivity and with any kind of excitation signal. Experimental tests are performed on a power supply: the results show the effectiveness of the proposed approach.