The invention discloses a whole-machine data analysis and testing device for a rotary drilling rig. The whole-machine data analysis and testing device comprises a driving shaft (8), a power box (7), a dynamometer (11), a pile casing (2), a floor (1), an anchor rod (15) and a hydraulic damping system, wherein the pile casing and the anchor rod are pre-buried in a foundation, the power box is mounted at the top of the pile casing, an output transmission shaft of the power box is coaxially connected with the dynamometer, and torque, rotational speed and power sensor signal circuits of the dynamometer, as well as pressure and lifting force sensor signal circuits of the hydraulic damping system are connected into a computer control system. According to the whole-machine data analysis and testing device disclosed by the invention, on the one hand, the structure is simple, reliable and practical; on the other hand, the whole-machine data analysis and testing device can ensure the accuracy in measurement of technical parameters so as to manufacture high-quality products; and furthermore, the whole-machine data analysis and testing device can give out different data values according to different geological conditions, test according to a prescribed program and save ground resources.