While Appium can’t alone test battery, it can however be used to drive battery discharging by performing actions on device like:
- running automated tests/actions against some app
- adjust screen brightness
- adjust audio volume
- for driving/running some app, use something CPU/memory intensive (game, video playback, hardware benchmark software)
And combined with good hardware test setup, could also drive device charging of battery as well (e.g. hook up device to cable & USB charger but have this charger controlled by a “controllable” on/off switch (e.g. smart switch/outlets). Hopefully such switching setup can be controlled via API (or otherwise smartphone app, website, etc.). This way you can control when to charge battery powering switch/charger on and when to let it discharge w/ switch/power off.