Engine testing in the 1930`s through to the end of WW2 became progressively more sophisticated, to the degree where the testing itself was probably more complex than the vast majority of piston engine testing done today.
The principal reasons for that seemingly bizarre state of affairs is that aircraft piston engines today, for the most part are simple affairs, cheap and designed for civil aircraft of very modest performance, and automotive engines, generally not needing to be tested at such radically different atmospheric pressure conditions, and extremely high speeds as would be seen in WW2 military fighters, simply do not require it.
Naturally some exceptions remain, but even a Formula One engine test-cell does not boast quite such a set of atmospheric conditioning as the facilities of the FIAT aero engine cells in Italy in the late 1930`s.
The FIAT test cell below, was certainly the most advance aero engine test cell in the world when it was completed in 1939.
The engine was encased in a sealed steel pressure chamber/wind-tunnel, which was filled with immensely powerful heat exchangers. This was able to essentially set the engine in conditions in which it would really experience at full flight speed at very high altitude and subsequent low pressure.
Sealed tubes vented the exhaust gas outside of the chamber (see schematic balloon number “31)