Exactly the way I compare ESC performance in testing. You pretty much need to have an input power constant to obtain across the board accuracy between products. As you mentioned, there's too many other variables introduced with batteries.
The issue I found (linked below) is reporting related to power (i.e., watts, and not just volts or amps). I've tested motor/ESC combinations with a power supply set to constant voltage and the results are not materially different than when testing with a battery as long as everything is standardized by power consumption.