An energy-efficient and simple method of testing electric motors in a dynamic mode is considered. When testing an electrical machine, the rotor is driven into a reciprocating rotary motion. The source of power of the power converter, which controls the electric machine, is a supercapacitor. When the electric machine is accelerated, electric energy is consumed from the supercapacitor, when the machine brakes the kinetic energy of the moving masses is converted into electrical energy, which accumulates in the supercapacitor. The energy loss during the operation of the electromechanical system in the dynamic mode is compensated by recharging the supercapacitor using a controlled rectifier connected to the power supply network.