The invention discloses a hydraulic system for hydraulic rock drill testing. The hydraulic system comprises a hydraulic oil tank, a check valve C, a hydraulic pump, an overflow valve, a reversing valve, a liquid control one-way valve, an impacted oil cylinder, a one-way valve, a check valve D, a pressure sensor, a pressure gauge and a gravity energy accumulator. When the system is used for testing a hydraulic rock drill, an impacted piston is subjected to rock drill impacts, a balance weight block in the gravity energy accumulator ascends by a certain height under the action of hydraulic oil, and the impact energy of the hydraulic rock drill is measured according to the ascending height of the balance weight block. Energy equivalent to the ascending height of the balance weight block can be calibrated and converted according to a heavy hammer with the fixed height. The check valve D in a system loop can be opened, and the durable running test of the rock drill can be conducted. The system is applicable to testing of performance of various hydraulic rock drills different in power, operation is simple, and calculation is convenient.