I work on mathematical modelling software, which runs on a variety of platforms. The product is a library, not an app.
For Android, I've found it easiest to re-use the command-line test harness that's used on UNIX-family platforms, and run that via the Android Debug Bridge. That's an ingenious piece of software that gives you access to a UNIX-style shell running on an Android device. I put my libraries, executables and test data on the device, under
/data/local/tmp (an area where the shell has full control of the file system) putting them there with "adb push". I automate testing with shell scripts, some running in the adb shell, and some running on the Linux machine I use as a development host.
There is a lot of testing, and it takes a long time to run, even on reasonably powerful devices. It also needs a lot of RAM: as of early 2023 at least 8GB available after operating system overheads, and at least 128GB of storage for test data. The testing runs overnight, so methods involving unplugging and re-plugging devices are off the table.
In my case, it is sometimes necessary to run testing continuously for more than a week, so battery capacity is not really relevant: the hardware has to sustain testing on its power feed, rather than draining the battery.
In my case, wireless communication is not used, because the test data is quite confidential, so we prefer to have the devices in airplane mode and do everything over USB. However, different strategies may be appropriate for apps, rather than libraries.
What are the principles for selecting hardware to get this job done efficiently?