Lego sells a
rechargeable battery for the EV3 but it is a bit pricey at $89, you also need to buy the
power supply which is another $27. If all you need is to keep your robot powered for a few hours while you work on software there is a cheaper alternative. You can buy a 9V power brick and alligator clips for $20 total.
Generic 5.5x2.1mm DC Barrel Jack to Dual Alligator Clips Connector
Regulated 9 Volt 1.5 Amp Power Adapter
These are available on amazon
You connect them to your EV3 like so:
Granted your robot cannot drive around while connected this way but if your robot is stationary or you can leave it stationary while you work out the kinks in your software this is a handy alternative that will save you about $100.