The invention discloses automatic test equipment for looseness of a screw of a locomotive and an automatic test method. The test equipment comprises a camera, a DSP (Digital Signal Processor), a sound early warning device, a GPRS (General Packet Radio Service) antenna and an SD (Secure Digital) storage card. The shape of the equipment is improved on the basis of a conventional flashlight, wherein the camera is installed at a lamp holder of the flashlight without affecting normal irradiation of a light source of the flashlight, and the DSP, the sound early warning device, the GPRS antenna and the SD storage card are positioned in the flashlight. Through local test and network background linkage, an image identification algorithm is adopted for realizing state identification of a screw looseness-prevention marking, so as to judge whether the screw is loosened, a numbered code corresponding to each screw is identified in a matching way, so that a background manager can intuitively and clearly know the looseness state of each screw through information transmission, the problems of high unreliability, high test leakage and false risk and the like existing in the conventional method completing looseness test of the screw of the current locomotive by depending on human experience are solved, and the scientificity and the intelligentization of the looseness test of the screw of the locomotive are enhanced.