For small motors, this is best done with a tool called a "Prony Brake", which is named after a fellow called Prony who invented this.
It is simple; a one foot long bar (from center of shaft to tip of bar) is clamped around the motor shaft, the tension of the clamp gives it an adjustable resistance to test different RPMs and loads.
The formula to measure horsepower is this:
Foot-pounds X RPM / 5250 = Horsepower X 746 = WATTS
To calculate foot-pounds with the prony brake test, first let the bar rest on the scale, and measure what this weight is. Subtract this weight of the bar itself from the total weight shown when testing the motor while it runs.