With the rapid development of electronic technology, semiconductor devices as the main bottom devices of various electronic systems, its related test technology and test equipment have always been an important guarantee of system reliability. In the automatic test system for semiconductor devices, the excitation source and measuring instrument adopt source measure unit, and the signal switching device adopts relay array. When testing different unit under test, one relay in the relay array will be turned on and connected to the test circuit, and the other relays are in the off state. There will be a large impedance insulation resistance between the relay switch contacts in the off state, which will lead to the introduction of leakage current on the order of nA to μA. Because the leakage current of semiconductor devices is usually between a few nA and a few μA, it is necessary to reduce the leakage current error caused by relay insulation resistance when using the automatic test system for semiconductor devices. In order to solve the above problem, this paper puts forward three methods: the selection of relay type, the grafting of switch contact pin and the design of equipotential shielding layer, so as to reduce the leakage current error caused by the insulation resistance of the relay, and then improve the accuracy of the test results.