Ok found a bit more info with some BING-fu - the power rating test seems to be defined in European standard EN 15194. I found a copy online here:
http://www.bikeebike.com/uploads/1/2/6/8/12686946/norme_en_15194.pdf
So it seems the power can be measured at the motor or at the wheel, and there seems to be a bit of flexibility in the test. But the full motor shaft test is detailed in EN 60034-1 and I can't find a free copy of that yet … (Edit 2004 version:
http://nostopmotor.com/Uploads/file/20160715/20160715112700_4090.pdf)
The relevant parts of the text seem to be:
4.2.7 Maximum power measurement
4.2.7.1 Measurement at the engine shaft
The maximum continuous rated power shall be measured according to EN 60034-1 when the motor reaches its thermal equilibrium as specified by the manufacturer.
NOTE Thermal equilibrium: temperatures of motor parts do not vary more than 2K per hour.
In circumstance where the power is measured directly at the shaft of the electronic motor, the result of the measurement shall be decreased by 1,10 to consider the measurement uncertainty and then by 1,05 to include for example the transmission losses, unless the real values of these losses are determined.
4.2.7.2 Alternative method
When the power is measured at the wheel, the result of the measurement is the reading value.
And then the alternative method is defined as:
Maximum power measurement - Alternative method
D.1 Generalities
This Annex gives guidance on how to measure the power at the wheel.
The maximum power which the bicycle gives assistance may differ by ± 5% of the power indicated on the label described in Clause 5. During a production conformity check, the maximum speed may differ by ± 10% from the above-mentioned determined value. The test shall be performed without pedalling using only the electrical assistance system (the test bicycle shall be prepared accordingly).
D.2 Test conditions
a) The test may be performed either on a test track, a test bench or on a stand that keeps the motor driven wheel free of the ground.
b) The speed-measuring device should have the following characteristics:
Accuracy: ± 2%
Resolution: 0,1 km/h
c) The ambient temperature should be between 5 °C and 35 °C.
d) Maximum wind speed: 3 m/s.
e) The battery should be fully charged according to the manufacturer's instructions.
f) The test should be performed with mass of the test bicycle equal to 150 kg.
D.3 Test procedure
Any appropriate method for checking for this requirement is acceptable.
a) Pre-condition the EPAC by running it for 5 min at 80% of the maximum assistance speed as declared by the manufacturer.
b) Stop the bicycle.
c) Note the time between the action start and the EPAC to travel 20 meters.
d) Verify the speed value is equal or less than the maximum speed declared by the manufacturer after 20 metres (D).
e) Verify the maximum continuous rated power at wheel is: P = m x 2 x D^2 / T^3 with the time T which is the noted value in c).
NOTE Considering that on a test track, the engine temperature is not stable, and the grip of the tyre on the road can be variable, the result of the measurement should be decreased by 1,10 to consider the measurement uncertainty. The measure is compared to the limit given in the scope of this European Standard.