Apparatus and method for autotest of key

The auto testing device for key-press comprises: an electric holding mechanism to fix the device to be tested, multiple cylinders with some assembled on the holding devices and others on the locating device, a gas valve, a computer to drive valve and control the cylinder, a data capture card arranged on the computer, a locating device, and multiple sensors arranged on the holding and locating devices to sense the locating action and return result to the computer. This invention has high automation level and reliable testing precision.