The invention relates to a whole railway traction locomotive tester, which belongs to the field of test and control on electric traction locomotive systems. The invention solves the traction and braking problems of the prior whole locomotive tester, and realistically simulates load characteristics in the process of the traction/braking of a locomotive. The tester consists of N sets of single-shaft assemblies, each set of single-shaft assembly comprises railway wheels, universal couplings, synchromesh transmissions, torque sensors and flywheels, wherein N is equal to 4, 6 or 8; and in each set of single-shaft assembly, compensated motors can be connected between the torque sensors and the flywheels. The tester can realistically simulate the load characteristics of a train and carry out a test on traction characteristics, braking characteristics and the like, the flywheels can store electric energy in the process of the traction characteristic test, and can feed the electric energy back to a railway network via a braking mechanism in the braking characteristic test, and thereby energy is efficiently utilized. The characteristics of the train, such as resistance in the process of uphill running, downhill running and stable running, can be simulated by controlling the compensated motors, so that a test result can be more real and reliable.