It is of great importance in many applications to provide a stable output power of a gyrotron-traveling wave tube (gyro-TWT) during a long operation time (over several hours). In order to achieve this goal, an automatic hot test platform of gyro-TWTs was set up and the power stabilization was obtained by an adaptive scheme of proportional integral derivative (PID) feedback by the beam current controlled by the filament heating power and cathode-anode beam voltage. With determined operating parameters, the PID controller can adaptively adjust the beam current and voltage, and then maintain the output power on a target. This PID controlling process can effectively eliminate the influence of the power supply voltage surge and cathode emission instability. Automatic hot test of the gyro-TWTs shows that the PID feedback controlling accuracy of the output power is better than 2%.