'Mobile Load Banks' were introduced by the LMS in 1947 using motor coaches whose motors acted as generators and could thus imposed a controlled load on the loco pulling them.
But finding space on the tracks for test trains could be a problem, particularly for constant speed tests.
"Rolling Road" test places - such as the Rugby Testing station - were originally built for steam locos, but the principle could be applied to any form of motive power. But I don't think any such plant was built in the UK; it seems that improved methods of measurement and recording allowed the needed measurements could be done 'on the road'.
(Information from 'The Oxford Companion to British Railway History' (Simmons and Biddle, OUP, 1997))