That's a brilliant idea!
I had thought the stepped output from the blanket control would test it at different speeds - but thinking about it - if it runs at one voltage then it will be OK at other voltages since all the speed control function is external to the loco.
Just one thing though - would it not be better to use another 12V battery in series with the car battery to test it at 24V - or would that not tell me anything useful - like if the insulation was breaking down anywhere?
.
Think you would need more than 24V to test for insulation breakdown, the old "Megger" insulation testers used 500-1000V+ to test insulation breakdown (scary things to calibrate).
A couple of questions
What are you actually testing?
Is it that the motor runs; then 12V should be plenty as I would surmise that the loco would be either on rollers or blocks with no load.
Checking lights and accessories then 12V again should be more than enough.
What size battery are you using?
Do you actually need 24V to run the loco would a smaller voltage still work?. I have never run any of my locos at full recommended voltage, including my LGB Stainz that runs happily on 10.8V. My biggest loco (Bachmann 3Truck Shay) runs realistically on a 14.8V 5200mAh battery for longer than I stay out running trains.
I have been told, but have found no evidence either way, that 24V is needed to "burn through" the tarnish/dirt etc to get rail powered trains to run.
For testing I would suggest a cheap model train controller, similar to what was suggested before.
I have made a mock up with a receiver/transmitter/ESC and a 13.8V amateur radio/CB power supply that I can connect to loco motors for testing or use for other projects like generating sound etc.