What I think they do IRL is make you run in a face mask and measure the amount of CO2 you exhale - the amount of CO2 corresponds accurately to an amount of energy.
energy used during exercise will be greater than work done because the body isn't 100% efficient - and there's a amount of energy used doing nothing - just staying alive.