First, given you measured 40VAC, you have a 9 amp charging system, as opposed to a 5 amp charging system(you would have measured around 28VAC then). So, your stator is working as it should. To verify operation of the regulator/rectifier block, you test by measuring the output current. This will be anywhere between 3 and 9 amps depending on initial battery voltage. Note that the battery voltage must be 5 volts or greater or there will be no output.
The current is measured by setting your meter up for CURRENT measurement on the 10A scale, and connecting the red lead to the red wire coming from the reg/rec block. The black lead of the meter connects to the POSITIVE terminal of the battery. Don't connect the black meter lead to ground (or the negative terminal) as that would be a dead short of the output of the reg/rec and you'll likely blow the fuse in your meter. You should measure the 3-9amps.
Should the motor be running? I assume that the yellow wire to the voltage regulator should be connected and the red wire disconnected so that I can put the probe into the red wire on the regulator. Thank you.